public static List <Specialization> GetList(User user) { try { var userSpec = UsersSpecializationsRepository.GetList().Where(x => x.User_Id == user.Id); return(GetList().Where(x => userSpec.Where(y => x.Id == y.Specialization_Id).Count() > 0).ToList()); } catch (Exception ex) { throw ex; } }
public static List <User> GetList(Specialization specialization) { try { var userSpec = UsersSpecializationsRepository.GetList().Where(x => x.Specialization_Id == specialization.Id); return(GetList().Where(x => userSpec.Where(y => x.Id == y.User_Id).Any()).ToList()); } catch (Exception ex) { throw ex; } }