views:

22

answers:

1

How to add object to a collection so that after .SaveChanges() it hasn't inserted/updated?

+2  A: 

Use Attach instead of Add.

Craig Stuntz
Then read the [MSDN documentation on Attaching and Detaching Objects](http://msdn.microsoft.com/en-us/library/bb896271.aspx).
Stephen Cleary