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