Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Modern ORMs handle this for you automatically, so I don't understand what the problem is. Commented Jul 19, 2016 at 15:16
  • @RobertHarvey Which ORM does support detached entities? Or what automated alternative do they provide? Commented Jul 19, 2016 at 15:18
  • 1
    What problem are you trying to solve? Patterns are solutions to well-known problems, so in order to select the correct pattern, you must first understand the problem. Detached entities are not the problem; they are the solution (if they, in fact, solve whatever actual problem you have). Commented Jul 19, 2016 at 15:51
  • Okay, so currently you're sending Datasets over the wire to a client, and then getting an updated Dataset back which you then save with a TableAdapter? You will need to modify this pattern to sending just plain objects over the wire, and when you get the updated objects back, you'll need to lean on the ORM framework of your choice to persist the updates. The most reliable way to do this is to load the unmodified entity from the DB with your ORM and apply the updates manually. (unchanged.Name = received.Name, etc.). Commented Jul 26, 2016 at 17:50