实体框架为在同一datacontext中更新数据提供了极大的灵活性
Dim personA = (from p in datacontext.Person where p.PersonID = 1 select p)
personA.name = txtName.value
datacontext.savechanges()
Run Code Online (Sandbox Code Playgroud)
如果我必须将此Update函数移动到仅在请求中使用"Person"的Service层,那么将"Person"请求对象分配到datacontext中而不再进行深度复制的最佳方法是什么?