public void SaveChanges() { using (MultithreadDbContext dbContext = new MultithreadDbContext()) { dbContext.SaveChanges(); } }
//private readonly MultithreadDbContext dbContext; //public LinksHistoryRepositoroes(MultithreadDbContext dbContext) //{ // this.dbContext = dbContext; //} public void Add(LinksHistoryEntity linksHistoryEntity) { using (MultithreadDbContext dbContext = new MultithreadDbContext()) { dbContext.Links.Add(linksHistoryEntity); dbContext.SaveChanges(); } }
public bool Contains(LinksHistoryEntity linksHistoryEntity) { using (MultithreadDbContext dbContext = new MultithreadDbContext()) { return(dbContext.Links.Any(f => f.Links == linksHistoryEntity.Links)); } }
public ParserPages( MultithreadDbContext multithreadDbContext, ILinksHistoryRepositoroes linksHistoryRepositoroes, LinksHistoryServices linksHistoryServices) { this.multithreadDbContext = multithreadDbContext; this.linksHistoryRepositoroes = linksHistoryRepositoroes; this.linksHistoryServices = linksHistoryServices; }
public StartApp( MultithreadDbContext dbContext, ILinksHistoryRepositoroes linksHistoryRepositoroes, LinksHistoryServices linksHistoryServices, ParserPages parserPages) { this.dbContext = dbContext; this.linksHistoryRepositoroes = linksHistoryRepositoroes; this.linksHistoryServices = linksHistoryServices; this.parserPages = parserPages; }