Integrating ASP.NET Core Web API and an existing database using Entity Framework 6.x
Entity Framework (EF) is ORM for .NET world. EF, just like other ORM, can be used to create new databases and tables or use it against an existing database.
We will be building ASP.NET Core Web API integrating against existing database using Entity Framework 6.1. We will use the Microsoft SQL Server learning database AdventureWorks2014.
EF 6.1 is an ORM built with full .NET framework, meaning it works with full .NET apps only. To achieve this, we will need to create ASP.NET Core for full .NET Framework instead of .NET Core.
We will create AdvWorksAPI
(ASP.NET Core Web API) integrated with the AdventureWorks2014 database using EF 6.1, by following these steps.
Restoring the AdventureWorks2014 database
Download and restore the AdventureWorks2014 database backup (https://msftdbprodsamples.codeplex.com/releases/view/125550). Microsoft SQL Server 2014 is used in this example.
This will act as an existing database for...