Category "entity-framework-migrations"

How skip some migrations in ef core?

I had some changes in my ef context and I added new Migraions dotnet ef migrations add changed98112601 then I run the below command dotnet ef database upd

The corresponding CLR type for entity type 'Employee' is not instantiable

My error: The corresponding CLR type for entity type 'Employee' is not instantiable and there is no derived entity type in the model that corresponds to a conc

EF Core 6 Seeding Data Gives Foreign Key error Despite Having FK Value

So, I have struggled with this for a while now and can't figure out what I'm missing. I have a table that holds an entity called Skill and the DataModel looks l

Entity Framework CORE Seeding Joining table

I am working on .NET CORE 6 along with EF CORE 7. I need to seed data in joining table but unable to do so and get error. I am seed FileTypeId but not sure why

EF Core 2.1 - No database provider has been configured for this DbContext

I have ASP.Net Core 2.1 with EF Core 2.1. This is how my DbContext class looks like app.DAL.EF -> Layer using app.domain; using Microsoft.EntityFrameworkCo

Error adding migration when data models are in a separate assembly

I've just setup new projects, Pegasus (my main web application) and PegasusEntities (my database objects). My Pegasus start-up code includes the following. buil

Entity Migration. Could not drop constraint. See previous errors

Here is the code that produce this error. I've tried solution for renaming the AddForeignKey but the error is same. 'PK_dbo.Item' is not a constraint. Co

Code first migration error "Implicit conversion from data type nvarchar(max) to varbinary(max) is not allowed"

I changed the data type of a field in my model from string to byte array and I got this error when I run Update-Database code first migration method. Implic

How to customize migration generation in EF Core Code First?

There is a special base table type in my DbContext. And when inherited from it I need to generate an additional "SQL" migration operation to create a specific t

Add new Required Field to one of table with EF Code First Migration

I am using EF Code First Migration. I already have lots of data on production Db and I would like to intorduce a non nullable field. How it could be possible?

Why does "dotnet ef migrations add" start my application?

I've created a new project using .NET 6 and EF Core 6 but when I try to create a migration using dotnet ef migrations add, the CLI begins running the applicatio