public async Task WhenSaveInstanceOfConcreteInheritedThenNotThrowsAsync() { using (var session = OpenSession()) using (var tx = session.BeginTransaction()) { var entity = new ConcreteB(); Assert.That(() => session.SaveAsync(entity), Throws.Nothing); await(tx.CommitAsync()); } }
public void WhenSaveInstanceOfConcreteInheritedThenNotThrows() { using (var session = OpenSession()) using (var tx = session.BeginTransaction()) { var entity = new ConcreteB(); session.Executing(s => s.Save(entity)).NotThrows(); tx.Commit(); } }
public void WhenSaveInstanceOfConcreteInheritedThenNotThrows() { using (var session = OpenSession()) using (var tx = session.BeginTransaction()) { var entity = new ConcreteB(); Assert.That(() => session.Save(entity), Throws.Nothing); tx.Commit(); } }
public void WhenSaveInstanceOfConcreteInheritedThenNotThrows() { using(var session = OpenSession()) using (var tx = session.BeginTransaction()) { var entity = new ConcreteB(); session.Executing(s=> s.Save(entity)).NotThrows(); tx.Commit(); } using (var s = OpenSession()) using (var tx = s.BeginTransaction()) { s.CreateQuery("delete from AbstractBA").ExecuteUpdate(); tx.Commit(); } }
public void WhenSaveInstanceOfConcreteInheritedThenNotThrows() { using (var session = OpenSession()) using (var tx = session.BeginTransaction()) { var entity = new ConcreteB(); session.Executing(s => s.Save(entity)).NotThrows(); tx.Commit(); } using (var s = OpenSession()) using (var tx = s.BeginTransaction()) { s.CreateQuery("delete from AbstractBA").ExecuteUpdate(); tx.Commit(); } }
public ConcreteA(ConcreteB B) { this.B = B; }
public static void Run(IServiceProvider serviceProvider) { ConcreteB _concreteB = serviceProvider.CreateScope().ServiceProvider.GetRequiredService <ConcreteB>(); }