linq SubmitChanges method isn't working
I am using a simple code as follows:
DataCla开发者_开发问答sses1DataContext context = new DataClasses1DataContext();
order oder = context.orders.Single(p => p.order_no == 3);
oder.ship_to_name = "test rana";
context.SubmitChanges();
However data isn't saving to sqlserver db. What have i missed? I have been trying basic linq tutorial
Regards
Does the orders table have a primary key? If not, then you wouldn't be able to perform updates.
精彩评论