public static void Main() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <SocialNetworkDbContext, Configuration>()); Importer.Create(Console.Out).Import(); DataSearcher.Search(new SocialNetworkService()); }
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); }