Exemple #1
0
        public static bool Commit()
        {
            try
            {
                EntityDb <T> .CommitChanges();

                EntityDb <T> .CloseSession();

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

                EntityDb <T> .CommitChanges();

                EntityDb <T> .CloseSession();

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