public async Task <ActionResult <CommonAPIResponse <JobSeekerRoleReturnDTO> > > GetJobSeekerRoleById(int id) { #region Vars JobSeekerRoleReturnDTO JobSeekerRoleReturnDTO = null; #endregion #region Declare return type with initial value. JsonResult jsonResult = GetDefaultJsonResult <object>(); #endregion try { if (id != default(int)) { JobSeekerRoleReturnDTO = await JobSeekerRoleAppService.GetJobSeekerRoleById(id); } #region Validate userIdentityDTO for nullability before prepaing the response. if (JobSeekerRoleReturnDTO != null) { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), JobSeekerRoleReturnDTO, HttpStatusCode.OK); } else { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), new object(), HttpStatusCode.BadRequest); } #endregion } catch (Exception exception) { } return(jsonResult); }
/// <summary> /// Get JobSeekerRole By Id /// </summary> /// <returns>JobSeekerRoleReturnDTO<JobSeekerRoleReturnDTO></returns> public async Task <JobSeekerRoleReturnDTO> GetJobSeekerRoleById(int JobSeekerRoleId) { #region Declare a return type with initial value. JobSeekerRoleReturnDTO JobSeekerRole = null; #endregion try { if (JobSeekerRoleId > default(int)) { JobSeekerRole = await JobSeekerRoleBusinessMapping.GetJobSeekerRoleById(JobSeekerRoleId); } } catch (Exception exception) {} return(JobSeekerRole); }
public JobSeekerRoleReturnDTO MappingJobSeekerRoleToJobSeekerRoleReturnDTO(JobSeekerRole JobSeekerRole) { #region Declare a return type with initial value. JobSeekerRoleReturnDTO JobSeekerRoleReturnDTO = null; #endregion try { if (JobSeekerRole != null) { JobSeekerRoleReturnDTO = new JobSeekerRoleReturnDTO { JobSeekerId = JobSeekerRole.JobSeekerId, JobRoleId = JobSeekerRole.JobRoleId, JobSeekerRoleId = JobSeekerRole.JobSeekerRoleId }; } } catch (Exception exception) { } return(JobSeekerRoleReturnDTO); }
/// <summary> /// Get user Action Activity Log By Id /// </summary> /// <returns>List<JobSeekerRoleReturnDTO></returns> public async Task <JobSeekerRoleReturnDTO> GetJobSeekerRoleById(int JobSeekerRoleId) { #region Declare a return type with initial value. JobSeekerRoleReturnDTO JobSeekerRole = new JobSeekerRoleReturnDTO(); #endregion try { JobSeekerRole jobSeekerRole = await UnitOfWork.JobSeekerRoleRepository.GetById(JobSeekerRoleId); if (jobSeekerRole != null) { if (jobSeekerRole.IsDeleted != (byte)DeleteStatusEnum.Deleted) { JobSeekerRole = JobSeekerRoleMapping.MappingJobSeekerRoleToJobSeekerRoleReturnDTO(jobSeekerRole); } } } catch (Exception exception) { } return(JobSeekerRole); }