Information générale
Catégorie:
Entity Framework
Versions des environnements
Network:
Windows 2003 Server
>Hi everybody,
>
>I am wondering why would our EntityState will always be Detached?
>
>We're not using the model classes directly in our client part of the application. In our methods we use ModelView and convert model class to a ModelView through AutoMapper and back when sending changes back to the backend.
>
>Is it what makes the entities detached and so that's why we're manually setting the state to Modified?
>
>Thanks in advance.
Yes. Entities are automatically attached if they are created and returned by the object context - which wouldn't be the case if you are mapping your classes back to an EF entity.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement