public BaseRepository(ICatalogContext catalogContext) { if (catalogContext == null) { throw new ArgumentNullException(nameof(catalogContext)); } this.collection = catalogContext.GetCollection <T>(typeof(T).Name); }
public CategoryProductRepository(ICatalogContext context) { Context = context; DbSet = Context.GetCollection <Models.CategoryProduct>(typeof(Models.CategoryProduct).Name); }
private void ConfigDbSet() { DbSet = Context.GetCollection <Models.Product>(typeof(Models.Product).Name); }