Code and prod logo

Code and Prod Complet Projects

Follow me

Code First data annotations in .net 7 are .NET attributes that can be applied to entity classes or properties to override the default conventions of entity framework core (EF Core) like column names, database types, definitions, and rules. ...
Remove Migration EF Core : in many cases and after apllaying add migrations you may find that you need to make additional changes to your EF Core model (add or remove property, chage data type, etc.) before applying them . Use this command to remove the last migration....
Data seeding is a process where you populate a database with an initial set of data. There are several ways to accomplish this in Entity Framework Core (EF Core): Model seed data, Manual migration customization, and Custom initialization logic....
Insert data using DbSet and DbContext: how we can use these two objects for inserting data into a database, so we will see how to Insert data via DbSet and how to Insert data via the DbContext....
dotnet ef migrations Add and dotnet ef database update: these two CLI commands are used to generate the script for creating the database of our project....
Create New Project using .NET7 CLI, and dotnet new command. The command-line interface (CLI) is a cross-platform toolchain for developing, building, running, and publishing applications...
DbContext and DbSet are the most used classes when working with the Entity Framework Core. We can use these two classes to easily perform CRUD operations....
Visual Studio Code (VS Code) is a free, cross-platform, and lightweight source-code editor developed by Microsoft for Windows, Linux, and Mac operating systems....
Entity Framework Core .NET7 or EF Core is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects...