public void ShouldReturnPlanFromEmployee() { using(var s = OpenSession()) using (var trans = s.BeginTransaction()) { var plan = new _401k {PlanName = "test"}; s.Save(plan); s.Refresh(plan); var emp = new Employee {EmpName = "name", PlanParent = plan}; s.Save(emp); trans.Rollback(); } }
public void ShouldReturnPlanFromEmployee() { using (var s = OpenSession()) using (var trans = s.BeginTransaction()) { var plan = new _401k { PlanName = "test" }; s.Save(plan); s.Refresh(plan); var emp = new Employee { EmpName = "name", PlanParent = plan }; s.Save(emp); trans.Rollback(); } }
public async Task ShouldReturnPlanFromEmployeeAsync() { using (var s = OpenSession()) using (var trans = s.BeginTransaction()) { var plan = new _401k { PlanName = "test" }; await(s.SaveAsync(plan)); await(s.FlushAsync()); await(s.RefreshAsync(plan)); var emp = new Employee { EmpName = "name", PlanParent = plan }; await(s.SaveAsync(emp)); await(trans.RollbackAsync()); } }