Пример #1
0
        public TblPhotofoldername getFNd(int id)
        {
            TblPhotofoldername obj = (TblPhotofoldername)NHSession.CreateCriteria(typeof(TblPhotofoldername))
                                     .Add(Restrictions.Eq(Constants.allModelProperties.PhotofoldernameId, id))
                                     .UniqueResult();

            return(obj);
        }
Пример #2
0
 public int AddEventName(TblPhotofoldername fn)
 {
     using (ITransaction T = NHSession.BeginTransaction())
     {
         try
         {
             int eventNameID = (Int32)NHSession.Save(fn);
             T.Commit();
             return(eventNameID);
         }
         catch (Exception ex)
         {
             T.Rollback();
         }
     }
     return(-1);
 }