Top "Entity-framework-4" questions

A tag for ADO.

Entity Framework 4 - AddObject vs Attach

I have been working with Entity Framework 4 recently, and am slightly confused as to when to use ObjectSet.Attach, and …

c# .net entity-framework-4 crud
The object cannot be deleted because it was not found in the ObjectStateManager

I am getting this error "The object cannot be deleted because it was not found in the ObjectStateManager." My code …

c# asp.net entity-framework-4
Entity Framework Code First AddOrUpdate method insert Duplicate values

I have simple entity: public class Hall { [Key] public int Id {get; set;} public string Name [get; set;} } Then in …

c# .net entity-framework-4
Adding stored procedures complex types in Entity Framework

I am trying to use a stored procedure in Entity Framework that returns nothing. I did the following: Added a …

c# stored-procedures entity-framework-4 silverlight-4.0
Entity Framework - Invalid Column Name '*_ID"

I've narrowed this down to some issue between Code First and Database first EF, but I'm not sure how to …

c# .net entity-framework-4
The mapping of CLR type to EDM type is ambiguous with EF 6 & 5?

Please any one can help me to fix this error? Schema specified is not valid. Errors: The mapping of CLR …

c# entity-framework entity-framework-4
How to set CommandTimeout for DbContext?

I am looking a way to set CommandTimeout for DbContext. After searching I found the way by casting DbContext into …

c# entity-framework-4 dbcontext command-timeout
A dependent property in a ReferentialConstraint is mapped to a store-generated column

I get this error when writing to the database: A dependent property in a ReferentialConstraint is mapped to a store-generated …

c# sql-server-2008 linq-to-sql entity-framework-4
Disable lazy loading by default in Entity Framework 4

It seems that lazy loading is enabled by default in EF4. At least, in my project, I can see that …

entity-framework lazy-loading entity-framework-4