c# - EF save to Context but not to Datasource -
After the EF reference and a completion, I want to work the following test.
TestEntity testEntity = New TestEntity () {name = "Hello World"}; Context.TestEntities.AddObject (testEntity); // Missing code assurance. RECAVOAL (1, Reference Test Entity. Counts ("not in the context of the unit!");
I know that it works with SaveChanges (), but I do not want to save the unit on the data source I am
test test test = new TestEntity () {name = "Hello World"}; Context.TestEntities.AddObject (testEntity); Var institutions INOSM = references ObjectState Manager GetObjectStateEntries (EntityState.Added | EntityState.Datedleted | EntityState.Modified | EntityState.Unchanged) Where (ent => entity entity is the Testimonial). Select (Ent = & gt; Ent. Entity Testimonial); Assurance REEqual (1, institutions INOSM.Count (), "not in context in the unit!");
Comments
Post a Comment