Entity Frame Work Delete entity optimistic error RRS feed

  • Question

  • Hi Every Body

    I have project that two table of it has one to one relation suppose tables :Media , Movie

    In model I designed that "Movie" Inherit from "Media" on the other hand Movie is a type of Media and has all property of media.

    My problem is when i want to remove Movie i use entity like this :Model.Media.remove(Movie)

    In save change i have this error :

    "Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See for information on understanding and handling optimistic concurrency exceptions."

    The solution that i found yet ,all are about updating ,but i don't have any problem with updating.I guess the problem is for inheritance ,but i am not sure.

    Thanks for any guides.



    • Moved by Mike Laughlin Tuesday, December 15, 2015 1:46 PM From 'Forums Issues' - not reporting an issue with the forums.
    Tuesday, December 15, 2015 7:59 AM