Ejemplo n.º 1
0
        public DataSet(CookbookDbContext dbContext)
        {
            if (dbContext == null)
            {
                throw new ArgumentNullException(nameof(dbContext));
            }

            _dbContext = dbContext;
        }
Ejemplo n.º 2
0
 public UnitOfWorkTransaction(CookbookDbContext dataModelContext, bool readOnly, bool isLongRunning)
 {
     _dataModelContext = dataModelContext ?? throw new ArgumentNullException(nameof(dataModelContext));
     _readOnly         = readOnly;
     if (isLongRunning)
     {
         return;
     }
     _transaction = _dataModelContext.Database.BeginTransaction();
 }