public static void Main() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <SocialNetworkDbContext, Configuration>()); Importer.Create(Console.Out).Import(); DataSearcher.Search(new SocialNetworkService()); }
public FileReadProcessor(string filePath, SearchSettings settings) { _searchSettings = settings; _dataExtractor = new DataExtractor(); _searcher = new DataSearcher(_searchSettings); ResultInSource = new List <SegmentData>(); ResultInTarget = new List <SegmentData>(); }
public FileReadProcessor(string filePath, SearchSettings settings) { _filePath = filePath; _searchSettings = settings; _dataExtractor = new DataExtractor(); _searcher = new DataSearcher(_searchSettings); _resultSrc = new List <SegmentData>(); _resultTrg = new List <SegmentData>(); }
public static void Main() { var data = new SocialNetworkDbContext(); XmlReader.ImportFriendshipDataFromXml(data); XmlReader.ImportPostsDataFromXml(data); var searcher = new SocialNetworkService(); DataSearcher.Search(searcher); }
public static void Main() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <SocialNetworkEntities, Configuration>()); var dbContext = new SocialNetworkEntities(); dbContext.Database.CreateIfNotExists(); var importer = new XmlImporter(dbContext); importer.Import(); var service = new SocialNetworkService(dbContext); DataSearcher.Search(service); }
public static void Main() { // prepare table var db = new SocialNetworkContext(); db.Database.Delete(); db.Database.Create(); //// task 6 - parsing data from xml var parser = new XmlParser(db); parser.ParseFriendShipData(); parser.ParsePostData(); // task 7 - linq requests to database implemented in MySearcher class MySearcher searcher = new MySearcher(db); DataSearcher.Search(searcher); }
protected override void OnInitialized() { base.OnInitialized(); DataSearcher?.Add(this); }