LINQ :how to update database ?

Database update calling the SubmitChanges method
var taxableProducts =
from p in db.Products
where p.Taxable == true
select p;
foreach( Product product in taxableProducts ) {
RecalculateTaxes( product );
}
db.SubmitChanges();

No comments:

Post a Comment