public async Task <ActionResult <CommonAPIResponse <JobSeekerTypeOfJobReturnDTO> > > GetJobSeekerTypeOfJobById(int id) { #region Vars JobSeekerTypeOfJobReturnDTO JobSeekerTypeOfJobReturnDTO = null; #endregion #region Declare return type with initial value. JsonResult jsonResult = GetDefaultJsonResult <object>(); #endregion try { if (id != default(int)) { JobSeekerTypeOfJobReturnDTO = await JobSeekerTypeOfJobAppService.GetJobSeekerTypeOfJobById(id); } #region Validate userIdentityDTO for nullability before prepaing the response. if (JobSeekerTypeOfJobReturnDTO != null) { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), JobSeekerTypeOfJobReturnDTO, HttpStatusCode.OK); } else { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), new object(), HttpStatusCode.BadRequest); } #endregion } catch (Exception exception) { } return(jsonResult); }
/// <summary> /// Get JobSeekerTypeOfJob By Id /// </summary> /// <returns>JobSeekerTypeOfJobReturnDTO<JobSeekerTypeOfJobReturnDTO></returns> public async Task <JobSeekerTypeOfJobReturnDTO> GetJobSeekerTypeOfJobById(int JobSeekerTypeOfJobId) { #region Declare a return type with initial value. JobSeekerTypeOfJobReturnDTO JobSeekerTypeOfJob = null; #endregion try { if (JobSeekerTypeOfJobId > default(int)) { JobSeekerTypeOfJob = await JobSeekerTypeOfJobBusinessMapping.GetJobSeekerTypeOfJobById(JobSeekerTypeOfJobId); } } catch (Exception exception) {} return(JobSeekerTypeOfJob); }
public JobSeekerTypeOfJobReturnDTO MappingJobSeekerTypeOfJobToJobSeekerTypeOfJobReturnDTO(JobSeekerTypeOfJob JobSeekerTypeOfJob) { #region Declare a return type with initial value. JobSeekerTypeOfJobReturnDTO JobSeekerTypeOfJobReturnDTO = null; #endregion try { if (JobSeekerTypeOfJob != null) { JobSeekerTypeOfJobReturnDTO = new JobSeekerTypeOfJobReturnDTO { JobSeekerId = JobSeekerTypeOfJob.JobSeekerId, TypeOfJobId = JobSeekerTypeOfJob.TypeOfJobId, JobSeekerTypeOfJobId = JobSeekerTypeOfJob.JobSeekerTypeOfJobId }; } } catch (Exception exception) { } return(JobSeekerTypeOfJobReturnDTO); }
/// <summary> /// Get user Action Activity Log By Id /// </summary> /// <returns>List<JobSeekerTypeOfJobReturnDTO></returns> public async Task <JobSeekerTypeOfJobReturnDTO> GetJobSeekerTypeOfJobById(int JobSeekerTypeOfJobId) { #region Declare a return type with initial value. JobSeekerTypeOfJobReturnDTO JobSeekerTypeOfJob = new JobSeekerTypeOfJobReturnDTO(); #endregion try { JobSeekerTypeOfJob jobSeekerTypeOfJob = await UnitOfWork.JobSeekerTypeOfJobRepository.GetById(JobSeekerTypeOfJobId); if (jobSeekerTypeOfJob != null) { if (jobSeekerTypeOfJob.IsDeleted != (byte)DeleteStatusEnum.Deleted) { JobSeekerTypeOfJob = JobSeekerTypeOfJobMapping.MappingJobSeekerTypeOfJobToJobSeekerTypeOfJobReturnDTO(jobSeekerTypeOfJob); } } } catch (Exception exception) { } return(JobSeekerTypeOfJob); }