Linq problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lloyd Sheen

    Linq problem

    In testing I am adding / removing items using linq.

    Steps:

    1. Add new item using InsertOnSubmit and SubmitChanges with no problem.

    2. Remove the item using DeleteOnSubmit and SubmitChanges with no
    problem.

    3. Attempt to add the just removed item. This results in the following
    error.

    {"Cannot add an entity with a key that is already in use."}

    Checking the database with SQL Server Management Server the row is
    definitely not in the database.

    Checking the datacontext collection for the table it not there.

    Why does Linq show an error. Is Linq really production ready?

    LS

Working...