为什么EF缺少这么多基本功能 [英] Why is there so much basic functionality missing from EF

查看:99
本文介绍了为什么EF缺少这么多基本功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用EF几个月了,而且我发现它的效果非常好,但是它缺少一些真正基本的功能,尽管它会支持它。例如:


- 无法撤消所有未保存的更改。


- 无法撤消单个对象


- 无法保存单个对象


- 必须传递上下文,当它出现时,对象本身会以某种方式进入上下文(对于延迟加载)


- 如果用户做出一些更改然后取消,没有办法处理弹出窗口。


意见?


  ;

解决方案

Hello MickleKulls,


欢迎来到EF论坛。


您可以使用ObjectStateEntry的原始值和当前值记录。此外,您的实体需要实现IEntityWithKey。

http:// msdn.microsoft.com/en-us/library/bb738667(v=VS.90).aspx


另外,我建议您查看此主题可能有用您。
http:/ /social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/c12bd8c8-231f-4dcc-a665-b048f7debbd7


最诚挚的问候,


I've been using EF for a few months now and I am finding works pretty well but it is missing some REALLY basic features that I would have though it would support. For example:

- can't undo all unsaved changes.

- can't undo single objects

- can't save a single object

- have to pass the context around when it would appear the objects themselves somehow can get to the context (for lazy loading)

- no good way to handle popup windows were a user makes some changes and then cancels.

Opinions?

 

解决方案

Hello MickleKulls,

Welcome to EF forum.

You can use the ObjectStateEntry's original values and current values records. In addition, your entity need to implement IEntityWithKey. http://msdn.microsoft.com/en-us/library/bb738667(v=VS.90).aspx

In addition, I suggest you can check this thread maybe helpful for you. http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/c12bd8c8-231f-4dcc-a665-b048f7debbd7

Best Regards,


这篇关于为什么EF缺少这么多基本功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆