Getting started with Entity Framework Core 3

The Microsoft.AspNetCore.App meta-package contains Entity Framework Core 3, including all the packages you need to work with Microsoft SQL Server and SQLite.

Note that, if you need to work with other databases such as MySQL, you have to download additional packages from NuGet.

You can find a list of all the currently available Entity Framework Core 3 NuGet packages here: https://www.nuget.org/packages?page=2&q=Tags%3A%22entity-framework-core%22.

Entity Framework is Microsoft's version of an ORM, and is not the only one that can be used on ASP.NET Core. Other ORMs of note that work seamlessly with .NET Core include NHibernate, LINQ to SQL, and Dapper.

ORMs are the recommended way to access databases, especially relational database management systems (RDBMS), in order to counteract the well documented impedance mismatch. ORMs abstract you, as a developer, away from the nitty gritty of SQL manipulations and implementations.

Entity Framework Core 3.0 is a later version of Entity Framework Core 1.0 and subsequent versions that have been evolving since Entity Framework versions were specifically designed for the .NET Framework.

You can install Entity Framework Core 3.0 by running the following command on the Package Manager Console: 

Install-package Microsoft.EntityFrameworkCore

By running the preceding command, you will receive the following output:

You will also need to install the SQL Server provider with the following command on the Package Manager Console since they work hand in hand: 

Install-package Microsoft.EntityFrameworkCore.SqlServer

Before you actually start to use EF Core 3.0, it is only natural to try to establish a connection to the database first, which we will look at in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.144.100