Ejemplo n.º 1
0
 public void Add(Business business)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.Save(business);
             transaction.Commit();
         }
 }
Ejemplo n.º 2
0
        public void CreateBusiness()
        {
            IService service = new Service();
            Business b = new Business();
            b.Id = 1;
            b.Name = "SKY";
            b.Employees = new List<Person>();
            Person p = new Person();
            p.Id = 1;
            p.Name = "Sepehr";
            b.Employees.Add(p);
            service.Add(b);

            Business sky = service.GetById(1);
            Assert.IsNotNull(sky);
        }
Ejemplo n.º 3
0
 public void Update(Business business)
 {
     throw new NotImplementedException();
 }