问题描述
我刚刚开始研究ADO .Net实体框架,到目前为止我喜欢我看到的内容。
唯一的问题是我能看到的大多数使用场景都有一个非常短暂的实体上下文。因此,最好的想法似乎是我应该以分离模式检索所有数据,将其发送到表示层(通过web服务或直接),它作用于它并返回业务层以进行更新。
我非常讨厌我必须要么:
1)再次点击数据库以检索实体的旧状态,然后更新它
/ p>
Hi,
I have just started working on the ADO .Net Entity Framework and so far I like what I see.
The only problem is that most of the usage scenarios that I can see have a very short lived Entity Context. So the best idea seems to be that I should retrieve all the data in detached mode, send it to the presentation layer (through a webservice or directly) which acts on it and returns it the business layer for update.
I seriously hate the fact that I have to either:
1) Hit the database again to retrieve the old state of the entity, and then update it
这篇关于在ADO .net实体框架中更新分离的实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!