Top "Entity-framework" questions

Entity Framework is a LINQ-based object-database mapper for .NET.

Entity Framework rollback and remove bad migration

I'm using EF 6.0 for my project in C# with manual migrations and updates. I have about 5 migrations on the database, …

c# entity-framework migration rollback
Entity Framework - "An error occurred while updating the entries. See the inner exception for details"

I have problem, I have just started learning EF Model First and Im staying in one point for some time. …

c# entity-framework ef-model-first
Entity Framework. Delete all rows in table

How I can quickly remove all rows in table using Entity Framework? I am currently using: var rows = from o …

c# sql linq entity-framework
The entity cannot be constructed in a LINQ to Entities query

There is an entity type called Product that is generated by entity framework. I have written this query public IQueryable&…

c# entity-framework
Entity Framework - Include Multiple Levels of Properties

The Include() method works quite well for Lists on objects. But what if I need to go two levels deep? …

c# entity-framework eager-loading
Entity Framework 6 Code first Default value

is there "elegant" way to give specific property a default value ? Maybe by DataAnnotations, something like : [DefaultValue("true")] public bool …

entity-framework ef-code-first default-value
Linq Syntax - Selecting multiple columns

This is my Linq Syntax which I am using to my entity model IQueryable<string> objEmployee = null; objEmployee = …

c# linq entity-framework
Set database timeout in Entity Framework

My command keeps timing out, so I need to change the default command timeout value. I've found myDb.Database.Connection.…

c# asp.net-mvc entity-framework .net-4.5 connection-timeout
Non-static method requires a target

I have a controller action that works fine on Firefox both locally and in production, and IE locally, but not …

c# asp.net-mvc asp.net-mvc-3 entity-framework entity-framework-5
Introducing FOREIGN KEY constraint may cause cycles or multiple cascade paths - why?

I've been wrestling with this for a while and can't quite figure out what's happening. I have a Card entity …

.net entity-framework foreign-keys ef-code-first entity-framework-4