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 to specify table name with Entity Framework Code First Fluent API

I have an Entity and I am to configure Entity Framework to map it to a database table with different …

c# entity-framework ef-code-first code-first
Returning a DataTable using Entity Framework ExecuteStoreQuery

I am working with a system that has many stored procedures that need to be displayed. Creating entities for each …

entity-framework stored-procedures code-first ef-code-first
composite key as foreign key

I am using Entity framework 4.1 in MVC 3 application. I have an entity where I have primary key consists of two …

c# entity-framework ef-code-first foreign-keys composite-key
EF CodeFirst: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong

I've a table named EducationTypes and an Entity named EducationType, I renamed one of entity properties, now I'm frequently getting …

c# entity-framework ef-code-first entity-framework-migrations
Unique key with EF code first

I have a following model in my project public class Category { public Guid ID { get; set; } [Required(ErrorMessage = "Title cannot …

c# ef-code-first entity-framework-4.1 unique-key
How to store images using Entity Framework Code First CTP 5?

I'm just trying to figure out if there is a simple way to store and retrieve binary (file) data using …

.net entity-framework sql-server-2008 ef-code-first
Get a list of elements by their ID in entity framework

How can I get all elements that are in another list by ID? For eg; I have List roles; I'd …

c# .net ef-code-first entity-framework-4.1
ICollection<T> Vs List<T> in Entity Framework

I only watched a few webcasts before I went head first in to designing a few Entity Framework applications. I …

c# list ef-code-first ienumerable icollection
How can set a default value constraint with Entity Framework 6 Code First?

In a legacy app, most string properties can't be null and need to have a default value of string.empty. …

c# .net entity-framework ef-code-first entity-framework-6
Set decimal(16, 3) for a column in Code First Approach in EF4.3

How can I do this : private decimal _SnachCount; [Required] [DataType("decimal(16 ,3)")] public decimal SnachCount { get { return _SnachCount; } set { _SnachCount = value; } } …

entity-framework ef-code-first sql-types