EF Core is a lightweight, extensible open source and crossplatform version of the popular entity framework data access technology.
It serves as an object-relational mapper (ORM), enabling .NET developers to work with a database using .NET objects, and eliminating the need for most of the data-access code they usually need to write.
This repository is composed of a SamuraiApp, a console app to demonstrate how we can easily create a database using database migrations and models defined in C# using entity framework Core.
It also covers the differences between EF Core and EF 6.
- The differences between database migrations
- The handling of entity relationships etc.
Thanks to Julie Lerman's course, I now know of EF Core Powertools, which helps to generate entity model diagrams that display how the model looks like even before creating the database depicting the many-many and one-one relationships clearly.
Create migrations using commands in nuget package manager console.
To create the migration to apply relationship changes:
add-migration newrelationships
This command compares the snapshot and the new members of the model to finally create the migration.
Once the file is create, you can run update-database
which will then apply the migration.