Beispiel #1
0
 public void Initialize()
 {
     Context = new ParikshaContext();
     EfUoW = new EFUnitOfWork(Context);
     UserRepository = new EFRepository<UserDetail>(EfUoW, Context);
     QuestionRepository = new EFRepository<Question>(EfUoW, Context);
     StandardRepository = new EFRepository<Standard>(EfUoW, Context);
     SubjectRepository = new EFRepository<Subject>(EfUoW, Context);
     User = new UserDetail { UserRole = UserRole.Admin, Password = "******", Name = "ashutosh", DateOfCreation = DateTime.UtcNow };
     Standard = new Standard { StandardName = "First" };
     Subject = new Subject { SubjectName = "Mathematics", SubjectCategory = "Algebra", Standard = Standard };
     UserRepository.Add(User);
     StandardRepository.Add(Standard);
     SubjectRepository.Add(Subject);
     EfUoW.Commit();
 }
 public void Initialise()
 {
     Context = new ParikshaContext();
     EfUnitOfWork = new EFUnitOfWork(Context);
     UserRepository = new EFRepository<UserDetail>(EfUnitOfWork, Context);
     SubjectRepository = new EFRepository<Subject>(EfUnitOfWork, Context);
     StandardRepository = new EFRepository<Standard>(EfUnitOfWork, Context);
 }