In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the example analysis of Entity Framework Core-related packages, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
I. introduction
We use the latest version of Entity Framework Core 3.1.1 to explain, before formal learning, our first step is to use the installation package in EF Core. At this time, we need to know exactly which packages need to be installed. Let's first explain some packages that need to be used in EF Core.
2. Related packages and their concepts 1. Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore:Entity FrameworkCore is a lightweight and extensible version of the popular EntityFramework data access technology provides the data context and DbSet attributes. In the program, we manipulate the data in the database through the data context and DbSet attributes.
2 、 Microsoft.EntityFrameworkCore.Relational
Microsoft.EntityFrameworkCore.Relational:Shared EntityFrameworkCore components for relational database provider: relational database providers share EF Core components. For example, we want to map entities to the database, all through this package.
3 、 Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.SqlServer:Microsoft SQL Server database provider for EntityFrameworkCore: the SQL Server database provider for EF Core. If you are using a SqlServer database, you need to install this package. For other databases, EF Core provides a corresponding provider installation package.
III. Installation
We explained several important package machine concepts above, so how to install these packages? We need to install these packages in NuGet. We create a class library project based on .NET Standard and a console project based on .NET Core. The class library project serves as the entity layer, and the project structure is shown in the following figure:
Then we install these packages in the console project, open NuGet, and search Microsoft.EntityFrameworkCore to install:
Click the "install" button to install. After the installation is complete, we can see the installed package in the dependency-> package:
The other two packages are installed in the same way. This completes the installation.
The package Microsoft.EntityFrameworkCore.Relational does not have to be installed. After installing the Microsoft.EntityFramework package, the package is installed automatically.
Thank you for reading this article carefully. I hope the article "sample Analysis of Entity Framework Core related packages" shared by the editor will be helpful to you. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.