Integration Testing in ASP.NET Core
In this article, we will learn about Integration Testing in ASP.NET Core. Additionally, we will prepare an in-memory database so we don’t have to use the real SQL server during integration tests. For that purpose, we will use the WebApplicationFactory class. [sc...
Testing Controllers with Unit Tests and Moq in ASP.NET Core
In the previous article, we learned how to write Unit Tests by using the xUnit and the different attributes that xUnit provides for us. We've also seen how to test validation rules inside a single validation class. But what about controllers and all the actions...
Unit Testing with xUnit in ASP.NET Core
This is the first article from the series where we are going to present different topics related to unit testing with xUnit in ASP.NET Core. Before we start with unit testing with xUnit, we are going to give a brief overview of the xUnit tool and our starting project....
How to Configure PostgreSQL in Entity Framework Core
In this article, we are going to learn how to configure PostgreSQL, a popular and reliable open-source relational database, in our .NET Core application, and connect it to Entity Framework Core to utilize its full potential. If you want to learn more about Entity...
Modifying Data with Entity Famework Core
Until now, we have talked about the EF Core integration into the ASP.NET Core app, how to configure nonrelational properties and how to create relationships in EF Core. Additionally, we talked about migrations and the way to use queries to fetch the data from the...
Database Queries in Entity Framework Core
In this chapter, we are going to talk about Queries in Entity Framework Core. In previous articles, we have already created and prepared the database with the required configuration. So, in this one, we are going to populate our additional tables with data and start...
Entity Framework Core Relationships – Convention, Data Annotations and Fluent API
In the second part of this series, we have learned how to configure non-relational properties in Entity Framework Core. So as a logical continuation, this article will be dedicated to learning about database relationships configuration with Entity Framework Core (EF...
Migrations and Seed Data With Entity Framework Core
In this section, we are going to cover Migrations and Seed data features in Entity Framework Core. In the previous parts of this series, we have created the database model (entity and context classes) and applied different configuration options. Now it is time to...
Configuring Nonrelational Properties in EF Core
In the previous article, we have created a basic setup for Entity Framework Core in our ASP.NET Core project. In this article, we are going to talk about the EF Core configuration and the different configuration approaches. You can download the source code for this...
Entity Framework Core – Getting Started
In this article, we are going to get started with Entity Framework Core (EF Core). We are going to go through some of the basic but crucial information that will be valuable to you when starting with an ASP.NET Core project that uses Entity Framework Core. [sc...
Filters in ASP.NET Core MVC
Filters in ASP.NET Core MVC allow us to run certain actions before or after specific stages in the request processing pipeline. There are some built-in filters in ASP.NET Core. We can also write custom filters to execute actions at various stages of the request...
Unit Testing in ASP.NET Core MVC
In this article, we are going to cover Unit Testing or rather why we need unit tests and how to implement them in our ASP.NET Core applications. If you’ve missed some of the previous articles in the series we recommend visiting the series page: ASP.NET Core MVC...
Dependency Injection in ASP.NET Core MVC
In this article, we are going to discuss an important concept of ASP.NET Core MVC - Dependency Injection. If you’ve missed some of the previous articles in the series we recommend visiting the series page: ASP.NET Core MVC Series. To download this article’s source...
File Upload in ASP.NET Core MVC
File Upload is the process of uploading files from the user’s system to the web application’s storage. ASP.NET Core MVC actions support uploading of one or more files using simple model binding. We have covered the file upload support in ASP.NET Core Web API in detail...
Routing in ASP.NET Core MVC
In this article, we’re going to discuss the routing capabilities in ASP.NET Core MVC. We're also going to learn how to set up routes in two different ways. If you've missed some of the previous articles in the series we recommend visiting the series page: ASP.NET Core...
State Management in ASP.NET Core MVC
HTTP is a stateless protocol. So HTTP requests are independent messages that don't retain user values or app states. We need to take additional steps to manage state between the requests. In this article, we are going to look at various approaches to HTTP state...
Views, Partial Views, and Layouts in ASP.NET Core MVC
In the MVC pattern, Views handle the application's data presentation and user interaction. They also help to establish a Separation of Concerns (SoC) within an MVC application by separating the user interface markup from other parts of the application. A view is an...
Working with Data in ASP.NET Core MVC
In the previous part of this series, we built an ASP.NET Core MVC application using some mock data. In this part, we are going to look at the ways to connect the application with a database and work with data. We are going to use the EF Core Code-First approach which...
Getting Started with ASP.NET Core MVC
In this article, we are going to look at the basics of building an ASP.NET Core MVC web app. We are going to start by creating a simple ASP.NET Core MVC app using the default template provided by Visual Studio. The default template itself will translate into a working...
Consuming a GraphQL API with Angular
In the previous article, we have created an ASP.NET Core application to consume a GraphQL API. But we don't have to use only the ASP.NET Core app to consume a GraphQL API, we can do the same thing with the Angular application. To accomplish that, we are going to use...
Consuming a GraphQL API with ASP.NET Core
In the previous article, we have finished creating mutations in the GraphQL application, thus finishing the GraphQL integration in ASP.NET Core Web API. In this article, we are going to consume GraphQL API by creating an ASP.NET Core app. To consume GraphQL API with...