Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EntityState.Detached
Message
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01619307
Message ID:
01619393
Vues:
52
This message has been marked as a message which has helped to the initial question of the thread.
If you create an entity before calling DbTable.Add() or DbTable.Attach() if you check the state, it'll be detached.

If you load entities from the db they should always be attached.

+++ Rick ---

>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.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform