M
Michel Walsh
Is it possible to directly update over a join (by that, I mean without using
an explicit UPDATE SQL statement) over a join, in LINQ, when no relation
exists between the two tables?
DataContext db = new DataContext(connectionString);
var q1 = from a in db.tablea
from b in db.tableb
where a.ItemID= b.ItemID
select new{ upd = a.unitPrice, soso = b.unitPrice };
foreach( var w in q1)
{
w.upd = w.soso;
}
db.SubmitChanges();
does not work since w is not updateable.
Any suggestions?
Vanderghast, Access MVP
an explicit UPDATE SQL statement) over a join, in LINQ, when no relation
exists between the two tables?
DataContext db = new DataContext(connectionString);
var q1 = from a in db.tablea
from b in db.tableb
where a.ItemID= b.ItemID
select new{ upd = a.unitPrice, soso = b.unitPrice };
foreach( var w in q1)
{
w.upd = w.soso;
}
db.SubmitChanges();
does not work since w is not updateable.
Any suggestions?
Vanderghast, Access MVP