Esempio n. 1
0
        public static bool AddNewWithoutCommit(T entity)
        {
            try
            {
                EntityDb <T> .Save(entity);

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 2
0
        public static bool AddNewEntity(T entity)
        {
            try
            {
                EntityDb <T> .Save(entity);

                EntityDb <T> .CommitChanges();

                EntityDb <T> .CloseSession();

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