Updating an entity with linq to sql, do I call attach first?
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-04-08T21:30:18Z
Indexed on
2010/04/08
21:33 UTC
Read the original article
Hit count: 193
c#
|linq-to-sql
My code looks like:
Entity e = new Entity();
e.name = "..."; e.blah = 234;
MyDb.UpdateEntity(e);
public static void UpdateEntity(Entity e)
{
using(MyDatacontext dc = new MyDataContext())
{
dc. ?????????
}
}
So what do I do here to update the entity?
note: i just called it entity here, its something else in my project.
© Stack Overflow or respective owner