0

I have a WPF application and am using entity framework. I was reading the tutorial

and the author was talking about disconnected entities, which is the first time I have heard of them. I am a little confused as to when disconnected entities are actually needed, as I have been using EF just fine to do CRUD operations on my business objects. If I am using the same context when I am doing CRUD operations on a business object, why do I need to ever manually track the entity state changes? Thanks for any help.

John Edwards
  • 1,536
  • 3
  • 14
  • 33

1 Answers1

1

If you are always keeping around the originating context instance, then you probably do not need to worry about disconnected entities. Disconnected entities often come up in the context of web services or web sites, where the context from which an entity was originally retrieved (and, for example, placed into a Session) is no longer available some time down the road when that entity has been modified and needs to be saved back to the database.

CodingGorilla
  • 19,612
  • 4
  • 45
  • 65
  • Thank you. This is what I was gathering. The concept seemed to make more sense in an n-tier web application, but not an offline WPF app that just uses a server database. – John Edwards Jan 22 '14 at 18:25