Пример #1
0
        /// <summary>
        /// Commits this instance.
        /// </summary>
        /// <returns></returns>
        public int Commit()
        {
            ////BeginTransaction();
            auditLogger.Save(_dbContext);
            var result = _dbContext.SaveChanges();

            ////_transaction.Commit();
            return(result);
        }
Пример #2
0
        public void Commit()
        {
            if (logger != null)
            {
                logger.Log(context.ChangeTracker.Entries <BaseModel>());
            }

            context.SaveChanges();

            if (logger != null)
            {
                logger.Save();
            }
        }