InsertOnSubmit
Posted: Thu 01 Nov 2012 15:46
Hi
I am using a DataContext build on Oracle 11g, I have a type called VSpsk and I need to put some new objects into my Table, like this
var vs = new Vspsk();
vs.Id = 1;
vs.Name = 2;
var ls = Context.GetTable<Vspsk>();
ls.InsertOnSubmit(vs);
var q = ls.FirstOrDefault(v => v.Id.Equals(1));
Why is q null at this point ?
I can see Context.ChangeSet.Inserts contains the object -
am I supposed to join myself ?
Or is there some other way to do this without calling the database ?
Best regards
Glenn
I am using a DataContext build on Oracle 11g, I have a type called VSpsk and I need to put some new objects into my Table, like this
var vs = new Vspsk();
vs.Id = 1;
vs.Name = 2;
var ls = Context.GetTable<Vspsk>();
ls.InsertOnSubmit(vs);
var q = ls.FirstOrDefault(v => v.Id.Equals(1));
Why is q null at this point ?
I can see Context.ChangeSet.Inserts contains the object -
am I supposed to join myself ?
Or is there some other way to do this without calling the database ?
Best regards
Glenn