Пример #1
0
        public static bool EditWithoutCommit(T entity)
        {
            try
            {
                EntityDb <T> .SaveOrUpdate(entity);

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #2
0
        public static bool EditEntity(T entity)
        {
            try
            {
                EntityDb <T> .SaveOrUpdate(entity);

                EntityDb <T> .CommitChanges();

                EntityDb <T> .CloseSession();

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }