开发者

EF (Self Track Entities) in Winform Application

I want to use Entity Framework(with Self Track Entities) in my winform application; but i could not find any example of STE(Self Track Entities) with winform. Can someone tell if it's not recommended to use with winform?

As far as I know the use of STE is to track the changes being made and it 开发者_如何转开发requires little code for doing insert/update/delete. So, would it be a good idea to use it with that thought in mind?


The main purpose of STEs is that they can track changes when they are detached. They are mostly recommended in scenarios where your entity must cross physical boundary (like web services) so it needs to track changes when deserialized in another process and transport these tracked information back to original process.

Is it your scenario? If you don't have any process boundary between loading the entity and showing it in WinForm you don't need STEs. WinForm application is connected stateful scenario so you can use common attached entities and life context will track all changes for you (and it will do it much better than STEs).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜