public DataAccess() { _context = new TaskContext(); }
public Dal_Imp() { myDB = DBFactory.getDB(); ////אתחול רשימת לימודים //lStudies = new ListOfTasks { ListOfTasksId = 3, CategoryList = "Studies" }; //myDB.Lists.Add(lStudies); //myDB.SaveChanges(); //Task t = new Task //{ // ListOfTasksId = 3, // TaskId = 1, // NameTask = "s1", // LocationTask = "Tel Aviv", // TypeTask = type1.studies, // DescriptionTask = "complete all three layers in the project", // DateTask = new DateTime(2017, 03, 26), // WhenToRemember = new DateTime(2017, 03, 25), // PriorityTask = priority.HIGH, //}; //myDB.Tasks.Add(t); //myDB.SaveChanges(); ////אתחול רשימת עבודה //lWork = new ListOfTasks { ListOfTasksId = 2, CategoryList = "Work" }; //myDB.Lists.Add(lWork); //myDB.SaveChanges(); //Task t1 = new Task //{ // ListOfTasksId = 2, // TaskId = 1, // NameTask = "w1", // LocationTask = "Tel Aviv", // TypeTask = type1.work, // DescriptionTask = "complete all three layers in the project", // DateTask = new DateTime(2017, 03, 26), // WhenToRemember = new DateTime(2017, 03, 25), // PriorityTask = priority.HIGH, //}; //myDB.Tasks.Add(t1); //myDB.SaveChanges(); //אתחול רשימת משפחה //lFamily = new ListOfTasks { ListOfTasksId = 1, CategoryList = "Family" }; //myDB.Lists.Add(lFamily); //myDB.SaveChanges(); //Task t = new Task //{ // ListOfTasksId = 1, // TaskId = 1, // NameTask = "finish project 2", // LocationTask = "ramat gan", // TypeTask = type1.family, // DescriptionTask = "complete all three layers in the project", // DateTask = new DateTime(2017, 03, 26), // WhenToRemember = new DateTime(2017, 03, 25), // PriorityTask = priority.HIGH, //}; //myDB.Tasks.Add(t); //myDB.SaveChanges(); // }