Top "Entity-framework-migrations" questions

Migrations is a feature of Entity Framework that provides for detecting changes to a code(or database)-first model, and upgrading the database (or the model) schema based on those changes.

Change data in migration Up method - Entity Framework

I have added a new property into my existing model. It's a bool property with default value true. There are …

c# asp.net-mvc entity-framework entity-framework-migrations
Value cannot be null. Parameter name: entitySet

I have a fairly standard setup with simply POCO classes public class Project { public int ProjectId { get; set; } public string …

entity-framework entity-framework-migrations
EF Code First - Timeout expired. The timeout period elapsed prior to completion

Apology for this strangely worded question. I don't know what the actual problem is but hopefully someone can give me …

c# sql-server entity-framework entity-framework-migrations
EF 5. "Automatic migration was not applied because it would result in data loss" - only changed the column name

I have: AutomaticMigrationsEnabled = True AutomaticMigrationDataLossAllowed = False in my configuration file and the existing model is: Public Property ID() As Integer …

entity-framework entity-framework-5 entity-framework-migrations
How to run Seed() method of Configuration class of migrations

I have 2 questions: 1) How can I run Seed() method from the package-manager console without updating-database model? 2) Is there a way …

c# entity-framework code-first entity-framework-migrations
How to seed data with AddOrUpdate with a complex key in EF 4.3

I am trying to seed a development database with some test data. I have used context.People.AddOrUpdate(p => …

c# entity-framework-4.3 seed linq-expressions entity-framework-migrations
adding a foreign key with Code First migration

I have an error when trying to update my database after adding a migration. Here are my classes before add-migration …

entity-framework foreign-keys entity-framework-migrations
Migration: No DbContext was found in assembly

Using VS Community 2017. I have tried to create initial migration with error message saying: Both Entity Framework Core and Entity …

c# entity-framework model-view-controller dbcontext entity-framework-migrations
Entity Framework - Migrations - Code First - Seeding per Migration

I am looking into Migrations in an effort to clean up our deployment processes. The less manual intervention required when …

c# entity-framework .net-4.5 entity-framework-migrations seeding