My repository works in a UnitOfWork
model; all operations, whether retrieval or persistence, must be performed within the scope of an IDisposable
<
D: None of the above. Effectively disabling lazy-loading by keeping your UOW too short and defeats the purpose of a lazy-loading ORM. The fact that you have to re-associate disconnected objects as normal operations means that your unit of work boundaries are wrong.
Merge, Update, and Lock all have different purposes. If you're stuck with your current architecture then Lock is probably what you want.