Build a Basic Ticket Sales App With ASP.NET Core, Angular, and Stripe

Internet shopping is about more than just Amazon. It's become a daily activity for most Americans, and e-commerce is a required feature for many projects a developer may encounter. In this tutorial, you'll learn how to build an e-commerce site to sell tickets using an Angular 6 single page app (SPA) and an ASP.NET Core 2.1 backend API. You’ll build both the Angular and ASP.NET Core applications and run them from within VS Code. Let’s get to it!

Upgrade to Angular 6

I love to use the latest and greatest when starting a new project. But when you use a project generator (like Angular-CLI, or the DotNetCLI), you may be at the mercy of the latest version the authors of those libraries have added. Right now, the DotNet CLI generates an Angular application with dotnet new angular gives you an Angular app at about version 4.5, which is about two versions behind the latest. Let me show you how to upgrade the templates and the generated application so that you’re using Angular 6, which is the latest as of the time of this article.

Custom appsettings.json File for ASP.NET Core Integration Tests

ASP.NET Core introduced the concept of TestServer for the integration testing of web applications. Integration tests need web applications to run with all the bells and whistles to make sure that all the components work together with no flaws. Often we need special settings for integration tests as web applications cannot use live services and the easiest way to do it is to use a special appsettings.json file. This blog post shows how to do it.

Getting Started

Let's start with minimalistic integration test from ASP.NET Core integration tests document.

Conditionally Include Partial View in ASP.NET Core

I have an ASP.NET Core web application where I need to include a partial view only if it exists. The application uses areas and some areas may have their specific side menu. This blog post shows two ways to conditionally include a partial view in an ASP.NET Core layout page.

My goal is to do it the easiest way possible by using out-of-the-box things and making sure I don't create an ugly looking mess. I wanted to avoid all kinds of additional classes to wrap dirty secrets away from controllers and views.

Code Coverage Reports for ASP.NET Core

Code coverage reports for ASP.NET Core projects are not provided out-of-the-box, but by using the right tools we can build decent code coverage reports. I needed code coverage reports in some of my projects and here is how I made things work using different free libraries and packages.

Getting Started

To get started, we need a test project and some NuGet packages. Test project can be a regular .NET Core library project. Adda reference to web application project and write some unit tests if you start with a new test project. We also need some NuGet packages to make things work:

How to Implement Pagination in an ASP.NET Core App

Pagination ASP.NET CoreWhen you have to show hundreds or thousands of records on your web page then you should apply pagination. This is because your users must not see all the records on the same page (which looks bad), instead, they move from one page to another page, and only see the records of the selected page.

Pagination brings cleanliness in your web page. It is an important technique which you should never miss to use. In this tutorial, I will teach you how to create pagination in Records in ASP.NET Core.

Advanced Basics: Bootstrap 4 With ASP.NET Core TagHelpers

The title of this post, Advanced Basics, takes the basics and fundamental concepts of what a developer has learned, whether it be a technique or library, and extends it exponentially to advance it to be something more efficient and useful for future projects.

We kick this post off by combining some Bootstrap with ASP .NET Core TagHelper goodness to provide a worthy post (maybe even a series? See below for more).

Streaming in ASP.NET Core SignalR

In this post, we'll see how to stream the data in ASP.NET Core SignalR. With ASP.NET Core 2.1 released, SignalR now supports streaming content.

What Is a Stream?

Streaming or media streaming is a technique for transferring data so that it can be processed as a steady and continuous stream. - webopedia.com