예제 #1
0
        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>();
        }
예제 #2
0
 public BookCommandService(IBooksDbContext booksDbContext, IMapper mapper)
 {
     _booksDb = booksDbContext.Database;
     _mapper  = mapper;
 }
예제 #3
0
 public BookQueryServiceTest()
 {
     _mockedBooksDbContext = GetMockedBooksDbContext();
     _mockedMapper         = GetMockedAutomapper();
 }