示例#1
0
文件: Fixture.cs 项目: jrauber/GH1429
 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());
         }
 }
示例#2
0
		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();
			}
		}
示例#3
0
文件: Fixture.cs 项目: jrauber/GH1429
 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();
         }
 }
示例#4
0
		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();
			}
		}
示例#5
0
 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();
         }
 }
示例#6
0
		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();
			}
		}
示例#7
0
 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>();
 }