Repository Pattern: SaveOrUpdate() in Entity Framework and L2S

Posted by JMSA on Stack Overflow See other posts from Stack Overflow or by JMSA
Published on 2010-04-21T11:27:00Z Indexed on 2010/04/21 12:33 UTC
Read the original article Hit count: 222

Filed under:
|
|

These web articles uses separate Save() and Update() methods in the repository pattern.

I am using repository pattern.

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?

© Stack Overflow or respective owner

Related posts about c#

Related posts about entity-framework