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.”

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: .
About these ads

Tags:

One Response to “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.””

  1. fedep3 Says:

    THANKS DUDE!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: