private Lookup_ParentNullable addParentNullable(DateTime date, decimal someValue, bool isStoring) { //var newParentNullable = new Lookup_ParentNullable(date, someValue, isStoring); //if (isStoring) { // expectedParentsNullable.Add(newParentNullable.Key, newParentNullable.ToString()); // assertData(); //} //return newParentNullable; if (isStoring) { DC.Data.StartTransaction(); new Lookup_ParentNullable(date, someValue, isStoring); DC.Data.RollbackTransaction(); assertData(); DC.Data.StartTransaction(); var newParentNullable = new Lookup_ParentNullable(date, someValue, isStoring); DC.Data.CommitTransaction(); expectedParentsNullable.Add(newParentNullable.Key, newParentNullable.ToString()); assertData(); return(newParentNullable); } else { return(new Lookup_ParentNullable(date, someValue, isStoring)); } }
private void store(Lookup_ParentNullable newParentNullable) { newParentNullable.Store(); expectedParentsNullable.Add(newParentNullable.Key, newParentNullable.ToString()); }