Friday, October 4, 2019

How Install Entity Framework Core in Asp. Net Core Project (Part-2)


step#1 : Watch Previous Article to create asp.net core application .https://dotnetcorecommunity.blogspot.com/2019/10/how-to-create-asp-net-core-project-part.html

Note : For Beginner Guide Articles :

https://dotnetcorecommunity.blogspot.com/p/aspnet-core-tutorials-paracticals.html




Now right click on the project ----> Manage Nuget Package -->click on browse tab and search for Microsoft.entityframeworkcore 





Install 
Microsoft.EntityFrameworkCore.SqlServer ,Select Stable version with your .net core version



alternatively you can write this command on package manager console.
Install-Package Microsoft.EntityFrameworkCore.SqlServer

Now search for Microsoft.EntityFrameworkCore.Tools and select the following selected package.
This will allow you to execute EF Core commands for scaffolding, migration etc. 



now right click on project----> click cs.proj file and paste this xml inside <ItemGroup> tag.


 <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />



Now, open the command prompt (or terminal) from the root folder of your project and execute EF Core commands from CLI starting with dotnet ef .




we have successfully install EF CORE IN ASP.NET CORE PROJECT , IN THE NEXT BLOG WE WILL LEARN DATABASE 1ST APPROACH

Previous Lesson                                                                                                Next Lesson

0 Comments:

Post a Comment

Do not Add Spam links in the Comment Box

Subscribe to Post Comments [Atom]

<< Home