public static List <EducationOrganizationModel> GetAllEducationOrganizations(this IOdsApiFacade odsApiFacade, IMapper mapper)
 {
     return(odsApiFacade.GetAllLocalEducationAgencies().Select(mapper.Map <EducationOrganizationModel>)
            .Union(odsApiFacade.GetAllPostSecondaryInstitutions().Select(mapper.Map <EducationOrganizationModel>))
            .Union(odsApiFacade.GetAllSchools().Select(mapper.Map <EducationOrganizationModel>))
            .ToList());
 }
 private bool BeUniqueId(int?id)
 {
     return(id != null &&
            _apiFacade.GetAllLocalEducationAgencies().Find(x => x.EducationOrganizationId == id) == null &&
            _apiFacade.GetAllSchools().Find(x => x.EducationOrganizationId == id) == null);
 }
 public static bool ProposedEducationOrganizationIdIsInUse(int id, IOdsApiFacade apiFacade)
 {
     return(apiFacade.GetAllPostSecondaryInstitutions().Find(x => x.EducationOrganizationId == id) != null ||
            apiFacade.GetAllLocalEducationAgencies().Find(x => x.EducationOrganizationId == id) != null ||
            apiFacade.GetAllSchools().Find(x => x.EducationOrganizationId == id) != null);
 }