Exemple #1
0
        public void ClearDB()
        {
            var context = new ComfortDevContext(testConnectionString);

            context.Users.RemoveRange(context.Users);
            context.SaveChanges();
        }
Exemple #2
0
 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;
 }
Exemple #7
0
 public TestQuestionRepository(ComfortDevContext context)
 {
     db = context;
 }