Posts Tagged ‘EntityFramework’

Entity Framework: code first – model first [bookmark]

August 1, 2012

A short bookmarks list on Entity Framework “code first – model first” and final NUGet Gallery link (for Entity Framework 5;) )

Hope it helps!

Technorati tags: EF, Entity Framework

SQL Server Replication and Entity Framework

August 11, 2011

When setup database merge replication, rowguid columns are added to every table automatically, identity cannot be used as primary key in this replication.
This rowguid column has default value, so your app doesn’t need to be updated … but, in EF you can update model from database schema, then all these rowguid columns are imported … and EF will raise error build. 😦

Column MyTable.rowguid in table MyTable must be mapped: It has no default value and is not nullable.

The quick&dirty solution is: edit .edmx file, and delete all rowguid columns, and everything related.

A better solution is to write an EF add-in extension, in order to filter away rowguid columns …
unfortunately, I can’t provide any link because can’t remember where I read that tip 😦
here is a post: Error 3032 during EF 4.0 validation  ,  last reply by JendaPearl
hope it helps! 😉

Technorati tags: SQL Server, Entity Framework

Entity Framework and GUID primary key

July 9, 2011

Moving Primary Key from Int Identity to UniqueIdentifier (… Guid) it’s a big deal.

Before you decide, better listen more than one voice 🙂
Here is once more: sing a GUID as an EntityKey in Entity Framework 4

😉

Technorati tags: Entity Framework, Guid

Entity Framework: “Unable to determine a valid ordering for dependent operations. Dependencies may exist due to foreign key constraints, model requirements or store generated values.”

February 18, 2011

Just for example:
refactoring some stored procedures, in order to get a simpler store procedure mapping,
combining ADD and UPDATE stored procedures in just one sp.

Field ID (int, identity(1,1)) as input parameter, and RETURN value, different by scopes: RETURN value only in ADD mapping,
both ADD ad UPDATE having ID as input parameter.

First tests failed, with this message: “Unable to determine a valid ordering for dependent operations. Dependencies may exist due to foreign key constraints, model requirements or store generated values.” .

Removing ID returned value in ADD action cleared the message, but it was necessary to auto-generate ID. 😦

Technorati Tags: .
  • August 2017
    M T W T F S S
    « Dec    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • .

    .Net Agile Antivirus Book C# Programming EntityFramework GTD Hyper-V LinQ MVVM Office Resharper SCRUM Security Sharepoint Silverlight SQLServer TFS ToDoList Unit Test VirtualBox Virtual PC Visual Studio VMware Windows7 WPF XeDotNet XML XPath