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