March 15, 2011

System.Data.UpdateException because it has a DefiningQuery

Poznámka pro mě ať to nemusím googlit. Chyba která se objeví při importu nějakých starých dat.

Je potřeba číst Warnings při vytváření Entities:

Message 1 The table/view 'XYZ' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.

Z tohoto důvodu pak není možné ukládat data do tabulky přes entity. Je potřeba vytvořit primární klíč.

0 comments:

Post a Comment