I am using linq to sql , and I return a queryable result from linq to sql :
var qry = from p in table select p;
Then I use this to bind to a xtragrid:
GridControl.DataSource = qry;
Then If I edit the records in xtraGrid, I just need to call
dataContext.submitChanges()
to submit the changes back to database.
My question is :
Am I possible to just add new records into the qry result, and after that I only need to
call dataContext.submitChanges()
, then linq can create new records on database automatically ?
Is that possible ? Can someone point me the right direction ? Thanks in advance !