/// <summary> /// Sets context for this repository /// </summary> /// <param name="dbContext"> /// An context to set /// </param> /// <returns> /// An instance of <see cref="GenericRepository{TEntity}"/> /// </returns> public virtual GenericRepository <TEntity> SetDbContext(Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies dbContext) { if (dbContext is Context.DataBaseContext dataBaseContext) { this.dbContext = dataBaseContext; this.dbSet = dataBaseContext.Set <TEntity>(); } return(this); }
// CONSTRUCTORS /// <summary> /// Initialize a new instance of <see cref="GenericRepository{TEntity}"/> /// </summary> /// <param name="context">Data context</param> public GenericRepository(Context.DataBaseContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public ReaderRepository(Context.DataBaseContext context) : base(context) { }
public BookRepository(Context.DataBaseContext context) : base(context) { }
public AbonnementRepository(Context.DataBaseContext context) : base(context) { }
public PublishHouseRepository(Context.DataBaseContext context) : base(context) { }
public GenreRepository(Context.DataBaseContext context) : base(context) { }
// CONSTRUCTORS /// <summary> /// Initializes new instance of <see cref="GenericRepository{TEntity}"/> /// </summary> public GenericRepository() { this.dbContext = null; this.dbSet = null; }
public AuthorRepositories(Context.DataBaseContext dataBaseContext) : base(dataBaseContext) { }
public CategoryRepository(Context.DataBaseContext context) : base(context) { }