public GenericEfRepository(INoleggioDbContext dbContext) { Guard.WhenArgument(dbContext, "DbContext can't be null").IsNull().Throw(); this.dbContext = dbContext; this.dbSet = this.DbContext.Set <TEntity>(); Guard.WhenArgument(dbSet, string.Format("This DbSet<{0}> doesn't exist in DbContext", typeof(TEntity).Name)).IsNull().Throw(); }
public UnitOfWork(INoleggioDbContext dbContext) { if (dbContext == null) { throw new ArgumentNullException("DbContext can't be null"); } this.dbContext = dbContext; }
public FakeUnitOfWork(INoleggioDbContext dbContext) : base(dbContext) { }
public MockedRepository(INoleggioDbContext dbContext) : base(dbContext) { }