public void ShouldNotThrowExceptionWhenTryingToSaveInherited2WithDuplicateName()
		{
			using (var session = OpenSession())
			using (var transaction = session.BeginTransaction())
			{
				var e2 = new Inherited2 { Name = "Sally" };
				session.Save(e2);

				transaction.Commit();
			}
		}
Ejemplo n.º 2
0
        public void ShouldNotThrowExceptionWhenTryingToSaveInherited2WithDuplicateName()
        {
            using (var session = OpenSession())
                using (var transaction = session.BeginTransaction())
                {
                    var e2 = new Inherited2 {
                        Name = "Sally"
                    };
                    session.Save(e2);

                    transaction.Commit();
                }
        }
Ejemplo n.º 3
0
        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();
			}
		}
Ejemplo n.º 5
0
        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();
                }
        }