I have created this method need to access in my code
This is a my repositoty calss method
- public IQueryable
GetJobs( string q = "", int pageIndex = 1, int pageCount = 20, JobsSortOptions sortBy = JobsSortOptions.jobId, JobStatus jobStatus = JobStatus.active, JobsSortByDate sortByDate = JobsSortByDate.date) - {
- IQueryable
jobs = from j in _context.Jobs - select j;
- if (!String.IsNullOrEmpty(q))
- {
- jobs = jobs.Where(j => j.JobTitle.Contains(q)
- || j.JobId.ToString().Contains(q)
- || j.ReqQual.Contains(q));
- }
- switch (q)
- {
- case "name_desc":
- jobs = jobs.OrderByDescending(j => j.JobId);
- break;
- case "Date":
- jobs = jobs.OrderBy(j => j.JobId);
- break;
- case "date_desc":
- jobs = jobs.OrderByDescending(j => j.OpenDt);
- break;
- }
- //(pageIndex, pageCount)
- return jobs;
- // var getJobDetails = _context.Jobs.Where(j => j.JobTitle.Contains(q));
- //throw new NotImplementedException();
- }
Laxmidhar SahooPosted Aug 1, 2020, 7:14 AM
Rishi TiwariPosted Jul 31, 2020, 11:28 PM
Farhan AhmedPosted Jul 25, 2020, 2:29 AM
Laxmidhar SahooPosted Jul 25, 2020, 2:22 AM