public EfGenericRepository(IBooksDbContext context) { if (context == null) { throw new ArgumentException("An instance of DbContext is required to use this repository.", "context"); } this.Context = context; this.DbSet = this.Context.Set <T>(); }
public BookCommandService(IBooksDbContext booksDbContext, IMapper mapper) { _booksDb = booksDbContext.Database; _mapper = mapper; }
public BookQueryServiceTest() { _mockedBooksDbContext = GetMockedBooksDbContext(); _mockedMapper = GetMockedAutomapper(); }