Beispiel #1
0
        public async Task FormulaOfEscapedDomainClassShouldBeRetrievedCorrectlyAsync()
        {
            using (ISession session = OpenSession())
            {
                using (ITransaction transaction = session.BeginTransaction())
                {
                    var entity = new EscapedFormulaDomainClass();
                    entity.Id = 1;
                    await(session.SaveAsync(entity));

                    await(transaction.CommitAsync());
                }

                session.Clear();

                using (ITransaction transaction = session.BeginTransaction())
                {
                    var entity = await(session.GetAsync <EscapedFormulaDomainClass>(1));

                    Assert.AreEqual(1, entity.Formula);
                    await(session.DeleteAsync(entity));

                    await(transaction.CommitAsync());
                }
            }
        }
		public void FormulaOfEscapedDomainClassShouldBeRetrievedCorrectly()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var entity = new EscapedFormulaDomainClass();
					entity.Id = 1;
					session.Save(entity);

					transaction.Commit();
				}

				session.Clear();

				using (ITransaction transaction = session.BeginTransaction())
				{
					var entity = session.Get<EscapedFormulaDomainClass>(1);

					Assert.AreEqual(1, entity.Formula);
					session.Delete(entity);

					transaction.Commit();
				}
			}
		}
Beispiel #3
0
        public void FormulaOfEscapedDomainClassShouldBeRetrievedCorrectly()
        {
            using (ISession session = OpenSession())
            {
                using (ITransaction transaction = session.BeginTransaction())
                {
                    var entity = new EscapedFormulaDomainClass();
                    entity.Id = 1;
                    session.Save(entity);

                    transaction.Commit();
                }

                session.Clear();

                using (ITransaction transaction = session.BeginTransaction())
                {
                    var entity = session.Get <EscapedFormulaDomainClass>(1);

                    Assert.AreEqual(1, entity.Formula);
                    session.Delete(entity);

                    transaction.Commit();
                }
            }
        }