public IEntityRepository <T> CreateEntityRepository <T>(WebSearcherContext context) where T : Entity { return(new EntityRepository <T>(context)); }
public UnitOfWork(IEntityRepositoryFactory entityRepositoryFactory) { _webSearcherContext = new WebSearcherContext(); this.WebPages = entityRepositoryFactory.CreateEntityRepository <WebPage>(_webSearcherContext); this.WebPagesConnections = entityRepositoryFactory.CreateEntityRepository <WebPageConnection>(_webSearcherContext); }
public EntityRepository(WebSearcherContext webSearcherContext) { _webSearcherContext = webSearcherContext; dbSet = webSearcherContext.Set <TEntity>(); }