开发者

Repository Pattern: SaveOrUpdate() in Entity Framework and L2S

开发者 https://www.devze.com 2022-12-27 11:25 出处:网络
These web articles uses separate Save() and Update() methods for saving and upd开发者_运维百科ating an entity.

These web articles uses separate Save() and Update() methods for saving and upd开发者_运维百科ating an entity.

How can I write a SaveOrUpdate() method in Entity Framework with the help of ObjectContext and in Linq-To-SQL with the help of DataContext?

That is, how can I write a single method that shall do both save and update job?


Try looking at the Unit of Work pattern - Angry.Net Developer, ADO.NET team blog

0

精彩评论

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

关注公众号