/// <summary> /// Add JobSeekerExperience AppService /// </summary> /// <returns>bool<bool></returns> public async Task <bool> AddJobSeekerExperience(JobSeekerExperienceAddDTO jobSeekerExperienceAddDTO) { #region Declare a return type with initial value. bool isCreated = false; #endregion try { if (jobSeekerExperienceAddDTO != null) { isCreated = await JobSeekerExperienceBusinessMapping.AddJobSeekerExperience(jobSeekerExperienceAddDTO); } } catch (Exception exception) {} return(isCreated); }
/// <summary> /// Create User Action Activity Log /// </summary> /// <param name=></param> /// <returns>bool</returns> public async Task <bool> AddJobSeekerExperience(JobSeekerExperienceAddDTO JobSeekerExperienceAddDTO) { #region Declare a return type with initial value. bool isJobSeekerExperienceCreated = default(bool); #endregion try { #region Vars JobSeekerExperience JobSeekerExperience = null; #endregion JobSeekerExperience = JobSeekerExperienceMapping.MappingJobSeekerExperienceAddDTOToJobSeekerExperience(JobSeekerExperienceAddDTO); if (JobSeekerExperience != null) { await UnitOfWork.JobSeekerExperienceRepository.Insert(JobSeekerExperience); isJobSeekerExperienceCreated = await UnitOfWork.Commit() > default(int); } } catch (Exception exception) { } return(isJobSeekerExperienceCreated); }
/// <summary> /// Mapping user Action Actitvity Log /// </summary> /// <param name=></ param > /// <returns>Task<JobSeekerExperience></returns> public JobSeekerExperience MappingJobSeekerExperienceAddDTOToJobSeekerExperience(JobSeekerExperienceAddDTO JobSeekerExperienceAddDTO) { #region Declare a return type with initial value. JobSeekerExperience JobSeekerExperience = null; #endregion try { JobSeekerExperience = new JobSeekerExperience { JobSeekerId = JobSeekerExperienceAddDTO.JobSeekerId, CompanyName = JobSeekerExperienceAddDTO.CompanyName, EndFromMonth1 = JobSeekerExperienceAddDTO.EndFromMonth1, EndToMonth = JobSeekerExperienceAddDTO.EndToMonth, IsCurrentJob = JobSeekerExperienceAddDTO.IsCurrentJob, JobTitle = JobSeekerExperienceAddDTO.JobTitle, StartFromMonth = JobSeekerExperienceAddDTO.StartFromMonth, StartToMonth = JobSeekerExperienceAddDTO.StartToMonth, TypeOfJobId = JobSeekerExperienceAddDTO.TypeOfJobId }; } catch (Exception exception) { } return(JobSeekerExperience); }
public async Task <ActionResult <CommonAPIResponse <bool> > > AddJobSeekerExperience(JobSeekerExperienceAddDTO JobSeekerExperienceAddDTO) { #region Declare return type with initial value. JsonResult jsonResult = GetDefaultJsonResult <bool>(); #endregion try { #region Validate AddJobSeekerExperience for nullability before prepaing the response. if (await JobSeekerExperienceAppService.AddJobSeekerExperience(JobSeekerExperienceAddDTO)) { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), true, HttpStatusCode.OK); } else { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), false, HttpStatusCode.BadRequest); } #endregion } catch (Exception exception) { } return(jsonResult); }