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.

Code First entity framework connection string

I have 3 class projects in my solutions. 1. MVC4 project 2. Domain 3. Tests In the MVC4 project I have added a web.…

asp.net-mvc-3 frameworks entity code-first
Database.SqlQuery calling stored procedure that has multiple output parameters

I have a stored procedure like below which takes 1 input parameter ( Name ) and returns 2 output parameters( EmployeeId and Salary). Our …

entity-framework code-first
Fluent API, many-to-many in Entity Framework Core

I've searched stackoverflow for a proper solution on generating a many-to-many relationship, using EF Core, Code first and Fluent API. …

c# entity-framework code-first ef-fluent-api
How to update entities which are modified outside the DbContext?

I've a small problem with updating entities if the entity is changed outside the DbContext (is a detached entity). If …

c# entity-framework entity-framework-4 code-first
SQL 'time' type in Entity Framework Code First

I'm trying to create a 'time(7)' column in a table with Entity Framework Code First. This is my Entity: …

.net entity-framework entity-framework-4 ef-code-first code-first
C# How to use DataAnnotations StringLength and SubString to remove text

I have a model classes that has a description property with a data annotation attribute of StringLength and length is …

c# entity-framework entity-framework-4 code-first
Tool to convert Entity Framework EDMX to Code First

Is there a tool to convert an edmx into code-first? I know there was talk of one appearing in a …

.net entity-framework code-first edmx
Using MySql with Entity Framework 4 and the Code-First Development CTP

I thought I'd experiment a bit with Scott Guthrie's latest post on code-first dev with Entity Framework 4. Instead of using …

mysql asp.net-mvc entity-framework-4 code-first ctp
Why is my DbContext DbSet null?

I created a new Entity Frameworks Code First app and the DbSet (People) is returning null. public class Person { public …

entity-framework code-first ef-code-first