예제 #1
0
        public static bool AddNewWithoutCommit(T entity)
        {
            try
            {
                EntityDb <T> .Save(entity);

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

                EntityDb <T> .CommitChanges();

                EntityDb <T> .CloseSession();

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