Create Database in Entity Framework Core Using Code First Approach and CRUD Operation in EF Core

preview_player
Показать описание
Lost all views, all comments, all subscribers, in short codingFirday lost you and with no choice left had to create new Channel - please provide your support by subscribing to new channel CodingLocker, please find the link below.

Subscribe Coding Locker

codingFriday needs your support in retrieving all subscribers back at Coding Locker. See you all there at Coding Locker. Thanks

In this example you will learn how you can create the database from models in entity framework core using #codefirst approach.

Commands if latest one 3.1.4
dotnet ef migrations add InitialCreate --context YourContextName --project YourProjectName
dotnet ef Database Update --context YourContextName --project YourProjectName

3 Packages you need
Microsoft.EntityFrameworkCore 3.1.4
Microsoft.EntityFrameworkCore.Design 3.1.4
Microsoft.EntityFrameworkCore.Tools 3.1.4

And remove, PrivateAssets all - PrivateAssets from Design and tools as they are generated by default.

What is covered in this video of Database #migration in #entityframeworkcore
1. We created a new .net core microservice project
2. Created the model class and added properties
3. Added the required NuGet packages to run the migration commands
4. Executed migration commands like add-migration and update-database to create the migration script and update/create the database.
5. At last we added database create and get queries like #CRUDOperations using entity framework core.

You will find all the required commands and NuGet packages to create a database in entity framework code first approach.

GitHub URL

Subscribe

FOLLOW ME ON - Coding Friday

Linkedin Chandra Prakash Variyani
Рекомендации по теме
Комментарии
Автор

Nice. I'm glad you started from scratch with no databases created and covered the part where you update the database. A lot of people skip the step where you do 'database update'. If you miss this step, you won't have a database created. Most of the tutorials created the database beforehand as part of their "dry-run" or something and it makes it confusing when you're trying to following it step by step. This is a great quick and simple guide. I copied your run book into my notes for the future. Thanks man!

DiddleDangle
Автор

Need to work on screen presentation and overview skills

mwardell
Автор

Glossed over almost everything in super-fast video. Not valuable for learning.

stephenwebster