1

I have an Invoice entity with one LineItem in its line item colletion and then add another LineItem to it. I now want to discard this addition and refresh the Invoice from the database and therefore use dbContext.Entry(invoice).Reload().

However, the invoice still has two line items after this call, where the second one seems to be a copy of the first one. What is the reason for this and how can I solve it?

Christian
  • 7,433
  • 4
  • 36
  • 61
  • 1
    this maybe can help http://stackoverflow.com/questions/5466677/undo-changes-in-entity-framework-entities – bAN Jan 17 '13 at 11:07

0 Answers0