public static ContactInfo CreateNew(int depth = 0)
        {
            rt.srz.model.srz.ContactInfo entity = new rt.srz.model.srz.ContactInfo();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.HomePhone = "Test Test Test Test Tes";
            entity.WorkPhone = "Test Test Tes";
            entity.Email     = "Test ";

            return(entity);
        }
        public void Create()
        {
            try
            {
                rt.srz.model.srz.ContactInfo entity = CreateNew();

                object result = manager.Save(entity);

                Assert.IsNotNull(result);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
        public void Read()
        {
            try
            {
                rt.srz.model.srz.ContactInfo entityA = CreateNew();
                manager.Save(entityA);

                rt.srz.model.srz.ContactInfo entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA, entityB);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
        public void Delete()
        {
            try
            {
                rt.srz.model.srz.ContactInfo entityC = CreateNew();
                manager.Save(entityC);
                manager.Session.GetISession().Flush();
                manager.Session.GetISession().Clear();

                rt.srz.model.srz.ContactInfo entity = GetFirstContactInfo();

                manager.Delete(entity);

                entity = manager.GetById(entity.Id);
                Assert.IsNull(entity);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
        public void Update()
        {
            try
            {
                rt.srz.model.srz.ContactInfo entityC = CreateNew();
                manager.Save(entityC);
                manager.Session.GetISession().Flush();
                manager.Session.GetISession().Clear();

                rt.srz.model.srz.ContactInfo entityA = GetFirstContactInfo();

                entityA.HomePhone = "Test Test Test Test Test Test";

                manager.Update(entityA);

                rt.srz.model.srz.ContactInfo entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA.HomePhone, entityB.HomePhone);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }