コード例 #1
0
 public int Commit()
 {
     try
     {
         return(_dbContext.SaveChanges());
     }
     catch (Exception ex)
     {
         return(1); ///TODO manage  the exception here
     }
 }
        //public T GetRepository<T>() where T : class
        //{
        //    var result = (T)Activator.CreateInstance(typeof(T), _dbContext);
        //    if (result != null)
        //    {
        //        return result;
        //    }
        //    return null;
        //}

        public int Commit()
        {
            return(_dbContext.SaveChanges());
        }