Top "Ef-code-first" questions

EF Code-First is a way of using Microsoft's Entity Framework with POCO classes, as opposed to model-first or DB-first.

How can I force entity framework to insert identity columns?

I want to write some C# code to initialize my database with some seed data. Clearly, this is going to …

asp.net sql-server database entity-framework ef-code-first
One to one optional relationship using Entity Framework Fluent API

We want to use one to one optional relationship using Entity Framework Code First. We have two entities. public class …

c# entity-framework ef-code-first one-to-one ef-fluent-api
The term 'Update-Database' is not recognized as the name of a cmdlet

I am using EF5 beta1 and while I was able to run the "Update-Database" before. Now that I shut down …

entity-framework ef-code-first entity-framework-migrations entity-framework-5
Entity Framework Stored Procedure Table Value Parameter

I'm trying to call a stored procedure that accepts a table value parameter. I know that this isn't directly supported …

c# entity-framework stored-procedures ef-code-first table-valued-parameters
Get return value from stored procedure

I'm using Entity Framework 5 with the Code First approach. I need to read the return value from a stored procedure; …

c# stored-procedures ef-code-first entity-framework-5 return-value
How to create index in Entity Framework 6.2 with code first

Is there a way to create an index on a property/column using code-first, instead of using the new IndexAttribute ?

entity-framework entity-framework-6 ef-code-first
An error occurred while saving entities that do not expose foreign key properties for their relationships

I have a simply code in Entity Framework 4.1 code first: PasmISOContext db = new PasmISOContext(); var user = new User(); user.CreationDate = …

c# entity-framework ef-code-first entity-framework-4.1
LIKE query with Entity Framework

Possible Duplicate: How to do SQL Like % in Linq? Like Operator in Entity Framework? I'm doing a query like this: …

c# wpf sql-server-2008-r2 ef-code-first
Calculated column in EF Code First

I need to have one column in my database calculated by database as (sum of rows) - (sum of rowsb). …

c# sql-server ef-code-first entity-framework-5 calculated-columns
Default value for Required fields in Entity Framework migrations?

I've added the [Required] data annotation to one of my models in an ASP.NET MVC application. After creating a …

c# asp.net-mvc entity-framework ef-code-first