Top "Entity-framework-5" questions

The ADO.

What do I need to add into OnModelCreating(DbModelBuilder modelBuilder) function to define relations between Person and Role?

I'm using EntityFramework version 5.0 in WinForms project, .net 4.5. I have created 2 for me important Entities public class Role { [Key] [DatabaseGeneratedAttribute(…

c# entity-framework entity-framework-5 dbcontext
How do I undo the last Add-Migration command?

I have created a migration using the Add-Migration command, but I'd like to change the name of that migration. How …

entity-framework entity-framework-5 entity-framework-migrations
EF5: Cannot attach the file ‘{0}' as database '{1}'

I'm encountering the exact issue as described here (read section "Cannot Attach to Deleted MDF File"), but the solution to …

sql-server asp.net-mvc visual-studio-2012 entity-framework-5 localdb
DbContext AutoDetectChangesEnabled set to false detecting changes

I'm a bit stumped. From what I've read setting the DbContext.AutoDetectChangesEnabled to false should disable change tracking requiring one …

entity-framework entity-framework-5 dbcontext
Entity Framework - attribute IN Clause usage

I need to filter some Entities by various fields using "normal" WHERE and IN clauses in a query over my …

sql entity-framework entity-framework-5
Entity Framework - what is the current command timeout value

I'm using Entity Framework 5 and I wish to know the command timeout value. In order to do so, I cast …

c# entity-framework entity-framework-5
EF migration for changing data type of columns

I have a Model in my project as below: public class Model { public int Id { get; set; } public long FromNo { …

c# visual-studio entity-framework entity-framework-5 entity-framework-migrations
EF5 Getting this error message: Model compatibility cannot be checked because the database does not contain model metadata

I have this error message that keeps on displaying every time I run the application. I'm using Entity Framework 5: Code …

c# .net entity-framework entity-framework-5
Upgrade from Entity Framework 5 to 6

After upgrading our project from using Entity Framework 5 to Entity Framework 6 (though NuGets update function) i get the following error …

c# entity-framework entity-framework-5 entity-framework-6 ef-database-first
How to update only one table for model from database with Entity Framework?

I have a model generated from db with Entity Framework. When I have any change in database, I update model …

entity-framework entity-framework-4 entity-framework-4.1 entity-framework-5