Top "Entity-framework" questions

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

How to fix the datetime2 out-of-range conversion error using DbContext and SetInitializer?

I'm using the DbContext and Code First APIs introduced with Entity Framework 4.1. The data model uses basic data types such …

c# .net entity-framework ef-code-first dbcontext
Entity Framework: table without primary key

I have an existing DB with which I would like to build a new app using EF4.0 Some tables do …

.net entity-framework
Update Row if it Exists Else Insert Logic with Entity Framework

Does anyone have suggestions on the most efficient way to implement "update row if it exists else insert" logic using …

c# entity-framework
Decimal precision and scale in EF Code First

I'm experimenting with this code-first approach, but I'm find out now that a property of type System.Decimal gets mapped …

c# .net entity-framework ef-code-first decimal
The relationship could not be changed because one or more of the foreign-key properties is non-nullable

I am getting this error when I GetById() on an entity and then set the collection of child entities to …

entity-framework entity-framework-4.1
Group by with multiple columns using lambda

How can I group by with multiple columns using lambda? I saw examples of how to do it using linq …

c# .net entity-framework lambda
Solving "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection" InvalidOperationException

I am trying to populate a GridView using Entity Frameworkm but every time I am getting the following error: "Property …

c# asp.net entity-framework
Setting the default value of a DateTime Property to DateTime.Now inside the System.ComponentModel Default Value Attrbute

Does any one know how I can specify the Default value for a DateTime property using the System.ComponentModel DefaultValue …

c# asp.net entity-framework asp.net-core-2.1 ef-core-2.1
Entity Framework: There is already an open DataReader associated with this Command

I am using Entity Framework and occasionally i will get this error. EntityCommandExecutionException {"There is already an open DataReader associated …

linq entity-framework sql-server-2008