Showing posts with label Asp. Show all posts
Showing posts with label Asp. Show all posts

Saturday, August 10, 2019

Adding Entity Framework Core to the WebAPI Project

In the previous post we saw on how to create a basic WebAPI project in Asp.Net Core using Visua Studio 2017. In this post we shall see on how to add Entitiy Framework Core support to the basic project. First let us create a class Library project with name DataAccess. This project will deal with all database interactions and we will implement EntityFramework Core in this project.

Once the DataAccess project is created, delete the default class1.cs which got created with the project. Add the following NuGet packages using the NuGet package Manager.