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); }
public IndexModel(CoordinatingCompany.Data.CoordinatingCompanyContext context) { _context = context; }
private static List <Teacher> GetTeachers(CoordinatingCompanyContext context) => context.Teachers.Include(t => t.Department).ToList();
public DeleteModel(CoordinatingCompany.Data.CoordinatingCompanyContext context) { _context = context; }