Example #1
0
 public WriteBookRepository(BookLibraryDbContext ctx, IMapper mapper)
 {
     this._ctx          = ctx;
     this.mapper        = mapper;
     _books             = _ctx.Set <Book>();
     _booksAsNoTracking = _ctx.Set <Book>().AsNoTracking();
 }
Example #2
0
 protected BaseRepository(BookLibraryDbContext context)
 {
     _entities = context.Set <TEntity>();
     _context  = context;
 }
Example #3
0
 public GenericRepository(BookLibraryDbContext context)
 {
     this.context = context;
     this.set     = context.Set <T>();
 }