Top "Entity-framework-5" questions

The ADO.

POCO Class in EF not working as Expected

I have created a DataBase in SQL and created an EDMX in Visual Studio 2012. It automatically created POCO (TT) classes. …

visual-studio-2012 entity-framework-5 poco edmx
A relationship is in the Deleted state

When I am trying to clear a collection (calling .Clear) I get the following exception: An error occurred while saving …

c# entity-framework ef-code-first entity-framework-5
EF 5 Changing Connection String at Runtime

Ok, I want to recreate a project that I created using EF 4.1 to EF 5.0, simple enough or at least I …

entity-framework entity-framework-4.1 connection-string entity-framework-5
How do you downgrade a Entity Framework 5 migration in Visual Studio 2012?

I've noticed that when I create a code first database migration using add-migration it generates a Down() method as well …

asp.net-mvc visual-studio-2012 entity-framework-5
Are Find and Where().FirstOrDefault() equivalent?

I have been using the Find(id) extension method with collections in Entity Framework 5. However, many of the examples I …

.net linq entity-framework linq-to-entities entity-framework-5
Data Annotations with Entity Framework 5.0 (database first)

What is the best way to use data annotations for validation if I'm using an Entity Framework (v5.0) database first …

c# entity-framework entity-framework-5 data-annotations
EF Code First 5 - How to define nullable foreign key using Fluent API?

I have two table - 1. Account 2. Users In Account table, DefaultExpensePartner and AccountOwner are foreign key of UserId field of …

c# entity-framework-5 fluent
Using MVC 4 SimpleMembership with an existing database-first EF model

I am trying to use SimpleMembership in my MVC 4 for the first time and I already have an existing database …

asp.net-mvc-4 entity-framework-5 sql-server-2012 simplemembership ef-database-first
Entity Framework code first with TimeStamp type

I am using SQL Server 2008 R2 and Entity Framework 5.0. When the database is generated, I cannot add my property of …

.net sql-server-2008 entity-framework asp.net-4.0 entity-framework-5
EntityFramework: How to configure Cascade-Delete to nullify Foreign Keys

EntityFramework's documentation states that the following behavior is possible: If a foreign key on the dependent entity is nullable, Code …

entity-framework entity-framework-5