how update a record on specific id in linq + asp.net c#
A:
Care to post some sample code you've taken a stab at.
If it's linq2sql, then it should be a simple matter of Retrieving your object using your linq datacontext using a Where<T>()
clause , updating the object property and then calling the DataContext.SubmitChanges()
Eoin Campbell
2009-05-26 10:57:02
+1
A:
You can do it like this...
var record =
(
from x in db.TableName
where x.Id == 12345
select x
)
.Single()
x.DateUpdated = DateTime.Now;
db.SubmitChanges();
Hope it helps :)
Chalkey
2009-06-01 17:38:54