Exemplo n.º 1
0
        private void Clean()
        {
#if NCRAWLER35
            using (NCrawlerEntitiesDbServices e = new NCrawlerEntitiesDbServices())
            {
                foreach (CrawlHistory historyObject in e.CrawlHistory.Where(h => h.GroupId == m_GroupId))
                {
                    e.DeleteObject(historyObject);
                }

                e.SaveChanges();
            }
#else
            AspectF.Define.
            Do <NCrawlerEntitiesDbServices>(e => e.ExecuteStoreCommand("DELETE FROM CrawlHistory WHERE GroupId = {0}", m_GroupId));
#endif
        }
Exemplo n.º 2
0
		private void Clean()
		{
#if !DOTNET4
			using (NCrawlerEntitiesDbServices e = new NCrawlerEntitiesDbServices())
			{
				foreach (CrawlQueue queueObject in e.CrawlQueue.Where(q => q.GroupId == m_GroupId))
				{
					e.DeleteObject(queueObject);
				}

				e.SaveChanges();
			}
#else
			AspectF.Define.
				Do<NCrawlerEntitiesDbServices>(e => e.ExecuteStoreCommand("DELETE FROM CrawlQueue WHERE GroupId = {0}", m_GroupId));
#endif
		}
Exemplo n.º 3
0
        private void Clean()
        {
            #if NCRAWLER35
            using (NCrawlerEntitiesDbServices e = new NCrawlerEntitiesDbServices())
            {
                foreach(CrawlHistory historyObject in e.CrawlHistory.Where(h => h.GroupId == m_GroupId))
                {
                    e.DeleteObject(historyObject);
                }

                e.SaveChanges();
            }
            #else
            AspectF.Define.
                Do<NCrawlerEntitiesDbServices>(e => e.ExecuteStoreCommand("DELETE FROM CrawlHistory WHERE GroupId = {0}", m_GroupId));
            #endif
        }