Categories
.NET Core

Setup In-Memory Database For Testing In .NET Core

In this post you will learn how to setup in-memory database for testing in .net core applications. Introduction Whether we like it or not, we all face the need to test our code. Whether it is your Web API or it is a business logic layer, you will more than often find yourself writing tests […]

Categories
.NET Core

Connect .NET Core With PostgreSQL On A Docker Container

In this post, we will learn to quickly setup a .NET core app to connect with PostgreSQL database on a docker container environment. We will setup PostgreSQL with Docker Compose to have persistent data volume. Then we will connect to that database with the help of Entity Framework on a .NET core web API. Setup […]

Categories
.NET Core

Adding Migrations On Entity Framework .NET Core

In this post we will look at adding migrations on entity framework .net core applications. Introduction In our previous post, we looked at how we can setup our .net core app with entity framework code first approach. We will continue with the same DbContext and User entity that was created in the previous post for […]

Categories
.NET Core

Entity Framework Code First Approach With .NET Core

In this post we will look at how we can use Entity Framework code first approach with .NET Core application. Introduction Entity Framework is the most popular Object Relational Mapper (ORM) built for .NET framework. It enables developers to work with different databases using .NET objects eliminating the need to write lower level database access […]