public static void ActivateTeacher(string email, string password, CoordinatingCompanyContext context)
 {
     Teachers = teachers ?? (teachers = GetTeachers(context));
     if (Teachers.Any(t => t.Email == email))
     {
         users.Add(email, HashPassword(password));
     }
     SaveChanges(users);
 }
Exemplo n.º 2
0
 public IndexModel(CoordinatingCompany.Data.CoordinatingCompanyContext context)
 {
     _context = context;
 }
 private static List <Teacher> GetTeachers(CoordinatingCompanyContext context)
 => context.Teachers.Include(t => t.Department).ToList();
Exemplo n.º 4
0
 public DeleteModel(CoordinatingCompany.Data.CoordinatingCompanyContext context)
 {
     _context = context;
 }