public void Delete(DepartMajor entity)
 {
     using (ISession session = sessionFactory.OpenSession())
     {
         session.Delete(entity);
         session.Flush();
     }
 }
 public object Save(DepartMajor entity)
 {
     using (ISession session = sessionFactory.OpenSession())
     {
         var id = session.Save(entity);
         session.Flush();
         return id;
     }
 }