filmov
tv
Entity framework core migrations to create database using Code First approach in .net core

Показать описание
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
codingFriday needs your support in retrieving all subscribers back at Coding Locker. See you all there at Coding Locker. Thanks
This is the example of #codefirst approach that explains how to create a database using entity framework core #migration commands, it explains #DbContext class in #efcore how to enable the migration in visual studio
2019.
-------------------------------------------
Commands if latest version 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.
-------------------------------------------
Link to GitHub
--------------------------------------------
Requirement
Generate Database from models and they should have a relationship of the primary key and foreign key
Approaches for ef core migration
-------------------------------------------
To create the database using migrations in entity framework core there are 3 approaches are shared here.
1.Creation of database using ef core migration by running the application
2. Creation of Db by running the migration commands and using Data Annotations
3.Creation of Db by adding table configuration, explains DbContext EntityConfiguration.
-------------------------------------------
the migration commands to create the database in code first approach in ef core are -
add-migration 'nameofyourmigration'
update-database
-------------------------------------------
once you view this video you will have a clear understanding of
ef core code first migrations, code first approach in entity framework .net core, DbContext in entity framework core.
FOLLOW ME ON - Coding Friday
----------------------------------------------
Instagram CP Variyani
Linkedin Chandra Prakash Variyani
Facebook Chandra Prakash Variyani
Please subscribe if this video is helpful for you.
Subscribe Coding Locker
codingFriday needs your support in retrieving all subscribers back at Coding Locker. See you all there at Coding Locker. Thanks
codingFriday needs your support in retrieving all subscribers back at Coding Locker. See you all there at Coding Locker. Thanks
This is the example of #codefirst approach that explains how to create a database using entity framework core #migration commands, it explains #DbContext class in #efcore how to enable the migration in visual studio
2019.
-------------------------------------------
Commands if latest version 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.
-------------------------------------------
Link to GitHub
--------------------------------------------
Requirement
Generate Database from models and they should have a relationship of the primary key and foreign key
Approaches for ef core migration
-------------------------------------------
To create the database using migrations in entity framework core there are 3 approaches are shared here.
1.Creation of database using ef core migration by running the application
2. Creation of Db by running the migration commands and using Data Annotations
3.Creation of Db by adding table configuration, explains DbContext EntityConfiguration.
-------------------------------------------
the migration commands to create the database in code first approach in ef core are -
add-migration 'nameofyourmigration'
update-database
-------------------------------------------
once you view this video you will have a clear understanding of
ef core code first migrations, code first approach in entity framework .net core, DbContext in entity framework core.
FOLLOW ME ON - Coding Friday
----------------------------------------------
Instagram CP Variyani
Linkedin Chandra Prakash Variyani
Facebook Chandra Prakash Variyani
Please subscribe if this video is helpful for you.
Комментарии