Top "Code-first" questions

Code-first is a software implementation approach that favors programming against an API over other approaches that may rely more heavily on visual tools or require the presence of some external source that is inspected to generate program behavior, structure, or data.

Entity Framework, Code First, Update "one to many" relationship with independent associations

It took me way too long to find a solution to the scenario described below. What should seemingly be a …

entity-framework associations code-first dbcontext
Entity Framework CTP 4 - Code First Custom Database Initializer

I would like to implement a custom database initialization strategy so that I can generate the database schema and apply …

entity-framework code-first ctp4
Generate SQL CE database from EF Code-First DbContext class

I've defined a set of classes in the style of Entity Framework Code-First conventions and annotated the class properties with …

.net entity-framework sql-server-ce code-first ef-code-first
How do I get the raw SQL underlying a LINQ query when using Entity Framework CTP 5 "code only"?

I've using Entity Framework CTP5 in "code only" mode. I'm running a LINQ query on a object that was return …

sql entity-framework profiling code-first ef4-code-only
DDD with EF Code First - how to put them together?

I am learning DDD development for few days, and i start to like it. I (think i) understand the principle …

c# asp.net-mvc ef-code-first domain-driven-design code-first
Unique Constraint with Entity Framework using Code First Migrations

I am doing entity framework (v 5) code first migrations, on an MVC 4 application. I would like to add a unique …

entity-framework ef-code-first asp.net-mvc-4 code-first
How do I map TimeSpan with greater than 24 hours to SQL server Code First?

I am trying to map a TimeSpan Code First property to SQL server. Code First seems to be creating it …

sql-server entity-framework ef-code-first code-first
Influencing foreign key column naming in EF code first (CTP5)

I have a POCO class that has two one-way unary relationships with another class, both classes share an ancestor. The …

c# entity-framework code-first
using Guid as PK with EF4 Code First

I have this class and table: public class Foo { public Guid Id {get;set;} public string Name {get;set;} } create …

entity-framework-4 code-first entity-framework-ctp5 ef4-code-only
Entity Framework - The foreign key component … is not a declared property on type

I have the following Model public class FilanthropyEvent : EntityBase, IDeleteable { public int Id { get; set; } public string Name { get; set; } …

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