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