Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int id = ... // the primary key we want to look for
- using(var ctx = new MydataContext()) {
- SomeType record = ctx.SomeTable.Single(x => x.SomeColumn == id);
- //... etc
- // ctx.SubmitChanges(); // to commit any updates
- }
- var myOrders = from row in ctx.Orders
- where row.CustomerID = id && row.IsActive
- orderby row.OrderDate
- select row;
Add Comment
Please, Sign In to add comment