Updating data linq
Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers.Nor does it represent the opinion of my dog, because I don’t have one. In this example I’m going to extend a little bit of what I have demonstrated in my previous example.That articles also covered for creating select query for retrieving both single and multiple results.
Since this is a continuation of my previous example so I would suggest you to refer that first before you go any further.
Here is a simple code example below which will change a single row:(There is no difference between this and changing multiple row only need to retrieve multiple objects and change them) You will notice an interesting thing here, we didn’t have to use any extra method to tell Data Context object to notify the changes like ‘Insert On Submit’ or ‘Delete On Submit’ methods before .
We don’t have to, because the Data Context object keeps track of all objects it is containing in a time frame(after we retrieving them).
Take a look at the highlighted code below: thanks fot tutorial, but i have a little problem, i wonder to select data from griedview to detail view, gridvew using sql datasource but detailview using linq to sql, but why that come error??