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.

Validation failed for one or more entities while saving changes to SQL Server Database using Entity Framework

I want to save my Edit to Database and I am using Entity FrameWork Code-First in ASP.NET MVC 3 / C# …

c# sql asp.net-mvc entity-framework code-first
The model backing the <Database> context has changed since the database was created

The error message : "The model backing the 'AddressBook' context has changed since the database was created. Either manually delete/update …

.net entity-framework-4 code-first
CREATE DATABASE permission denied in database 'master' (EF code-first)

I use code-first in my project and deploy on host but I get error CREATE DATABASE permission denied in database …

code-first
Why use ICollection and not IEnumerable or List<T> on many-many/one-many relationships?

I see this a lot in tutorials, with navigation properties as ICollection<T>. Is this a mandatory requirement …

c# entity-framework code-first icollection
Entity Framework Code First - two Foreign Keys from same table

I've just started using EF code first, so I'm a total beginner in this topic. I wanted to create relations …

c# entity-framework orm code-first entity-framework-4.1
Nullable property to entity field, Entity Framework through Code First

Using the data annotation Required like so: [Required] public int somefield {get; set;} Will set somefield to Not Null in …

entity-framework asp.net-mvc-3 code-first nullable
ALTER TABLE DROP COLUMN failed because one or more objects access this column

I am trying to do this: ALTER TABLE CompanyTransactions DROP COLUMN Created But I get this: Msg 5074, Level 16, State 1, Line 2 …

c# sql sql-server code-first
Does Entity Framework Code First support stored procedures?

I've watched several presentations of EF Code First and haven't seen how EFCF works with stored procedures. How can I …

c# entity-framework stored-procedures code-first
How can I disable code first migrations

I have a code-first entity model in EF5. But I want to manage the database changes manually -- I do …

entity-framework migration code-first
how to use views in code first entity framework

How can I use the database view in entity framework code first,

.net database entity-framework view code-first