public bool Insert(FamilyDomain enitity)
 {
     try
     {
         using(var session = SessionFactory.OpenSession())
         using (var tx = session.BeginTransaction())
         {
             session.Save(enitity);
             return true;
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         return false;
     }
 }
 public bool Update(FamilyDomain entity)
 {
     try
     {
         using(var session = SessionFactory.OpenStatelessSession())
         using(var tx = session.BeginTransaction())
         {
             session.Update(entity);
             return true;
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         return false;
     }
 }