I'm confused a lot about connected model and disconnected in entity framework .
I was used traditional way ADO.net (DataReader for connected model and DataAdapter for disconnected model) and all I know that I use connected model when I have many users need to update or insert together and the disconnected model in a few circumstances when I need to send the data to other process make some operations on the data in memory and send them back to the db .
Now I read some articles about connected model and disconnected model in EF and I'm confused why should I attach explicitly the entities to the context in disconnected model ? I had read also that the default behavior in web is disconnected model and in WPF is connected model !
- Could someone explain in easy manner with an an analogy of real life what's the difference between the two models?
- How we could handle both models in EF with simple example?
- Is there a relationship between the type of app (web form , MVC, WPF, WCF) and the dedicated model used in the EF?
- When to use connected model and when to use disconnected model (using EF) ?
Aucun commentaire:
Enregistrer un commentaire