public void ClearDB() { var context = new ComfortDevContext(testConnectionString); context.Users.RemoveRange(context.Users); context.SaveChanges(); }
public ComfortDevUnitOfWork(ComfortDevContext db) { this.db = db; CourseTasks = new CourseTaskRepository(db); Tasks = new TaskRepository(db); TestAnswers = new TestAnswerRepository(db); TestQuestions = new TestQuestionRepository(db); Topics = new TopicRepository(db); Users = new UserRepository(db); UserCourses = new UserCourseRepository(db); }
public TopicRepository(ComfortDevContext context) { db = context; }
public TestAnswerRepository(ComfortDevContext context) { db = context; }
public CourseTaskRepository(ComfortDevContext context) { db = context; }
public UserRepository(ComfortDevContext context) { db = context; }
public TestQuestionRepository(ComfortDevContext context) { db = context; }