public void ShouldNotThrowExceptionWhenTryingToSaveInherited2WithDuplicateName() { using (var session = OpenSession()) using (var transaction = session.BeginTransaction()) { var e2 = new Inherited2 { Name = "Sally" }; session.Save(e2); transaction.Commit(); } }
public async Task ShouldNotThrowExceptionWhenTryingToSaveInherited2WithDuplicateNameAsync() { using (var session = OpenSession()) using (var transaction = session.BeginTransaction()) { var e2 = new Inherited2 { Name = "Sally" }; await(session.SaveAsync(e2)); await(transaction.CommitAsync()); } }
protected override void OnSetUp() { using (var session = OpenSession()) using (var transaction = session.BeginTransaction()) { var e1 = new Inherited1 { Name = "Bob" }; session.Save(e1); var e2 = new Inherited2 { Name = "Sally" }; session.Save(e2); session.Flush(); transaction.Commit(); } }