Beispiel #1
0
 public QueryResult ListOpenJobPost(JobPostQueryParamArg jobPostQueryParamArg, QueryParamArg queryParamArg)
 {
     return
         (ModelManagementContext()
          .JobPosts.Where(
              t =>
              t.IsActive == "Y" &&
              (string.IsNullOrEmpty(jobPostQueryParamArg.Sex) || t.Sex == jobPostQueryParamArg.Sex) &&
              (string.IsNullOrEmpty(jobPostQueryParamArg.JobLocation) ||
               t.JobLocation == jobPostQueryParamArg.JobLocation) &&
              (jobPostQueryParamArg.AgeFrom == null || t.AgeFrom >= jobPostQueryParamArg.AgeFrom) &&
              (jobPostQueryParamArg.AgeThru == null || t.AgeThru <= jobPostQueryParamArg.AgeThru) &&
              (jobPostQueryParamArg.HeightFrom == null || t.HeightFrom >= jobPostQueryParamArg.HeightFrom) &&
              (jobPostQueryParamArg.HeightThru == null || t.HeightThru <= jobPostQueryParamArg.HeightThru) &&
              (jobPostQueryParamArg.JobLocations.Count == 0 ||
               jobPostQueryParamArg.JobLocations.Contains(t.JobLocationGeoId)) &&
              (string.IsNullOrEmpty(jobPostQueryParamArg.StatusId) ||
               jobPostQueryParamArg.StatusId == t.StatusId) &&
              (string.IsNullOrEmpty(queryParamArg.SearchText) ||
               t.JobTitle.Contains(queryParamArg.SearchText) ||
               t.JobDescription.Contains(queryParamArg.SearchText)))
          .QueryResultList <JobPostListModel>(queryParamArg));
 }
Beispiel #2
0
 public ListOpenJobPostQuery()
 {
     JobPostQueryParamArg = new JobPostQueryParamArg();
 }