Friday, 6 September 2013

Datacontext reset at c#

Datacontext reset at c#

My WP app can edit data from database, which I get using LINQ query:
from item in db.SomeTable
where item.Id = 5
select new { Item = item}
And then I bind that selection to form controls. When I don't want to save
changes (no db.SubmitChanges() call), I call another LINQ to reset fiel,
but I get changed source values from db (even when I'm using select new {}
operator. If there any way to reset to default state, then I can get
default values using LINQ again?

No comments:

Post a Comment