/// <summary>
 /// Updae JobSeekerGrade AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> UpdateJobSeekerGrade(JobSeekerGradeUpdateDTO jobSeekerGradeUpdateDTO)
 {
     #region Declare a return type with initial value.
     bool isUpdated = false;
     #endregion
     try
     {
         if (jobSeekerGradeUpdateDTO != null)
         {
             isUpdated = await JobSeekerGradeBusinessMapping.UpdateJobSeekerGrade(jobSeekerGradeUpdateDTO);
         }
     }
     catch (Exception exception) {}
     return(isUpdated);
 }
        /// <summary>
        /// Update User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> UpdateJobSeekerGrade(JobSeekerGradeUpdateDTO JobSeekerGradeUpdateDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerGradeUpdated = default(bool);
            #endregion
            try
            {
                if (JobSeekerGradeUpdateDTO != null)
                {
                    #region Vars
                    JobSeekerGrade JobSeekerGrade = null;
                    #endregion
                    #region Get Activity By Id
                    JobSeekerGrade = await UnitOfWork.JobSeekerGradeRepository.GetById(JobSeekerGradeUpdateDTO.JobSeekerGradeId);

                    #endregion
                    if (JobSeekerGrade != null)
                    {
                        #region  Mapping
                        JobSeekerGrade = JobSeekerGradeMapping.MappingJobSeekerGradeupdateDTOToJobSeekerGrade(JobSeekerGrade, JobSeekerGradeUpdateDTO);
                        #endregion
                        if (JobSeekerGrade != null)
                        {
                            #region  Update Entity
                            UnitOfWork.JobSeekerGradeRepository.Update(JobSeekerGrade);
                            isJobSeekerGradeUpdated = await UnitOfWork.Commit() > default(int);

                            #endregion
                        }
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerGradeUpdated);
        }
        public async Task <ActionResult <CommonAPIResponse <bool> > > UpdateJobSeekerGrade(JobSeekerGradeUpdateDTO JobSeekerGradeUpdateDTO)
        {
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <bool>();
            #endregion

            try
            {
                #region Validate userUpdateDTO for nullability before prepaing the response.
                if (await JobSeekerGradeAppService.UpdateJobSeekerGrade(JobSeekerGradeUpdateDTO))
                {
                    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);
        }
 /// <summary>
 /// Mapping User Activity Log DTO to Action
 /// </summary>
 /// <param name=></param>
 /// <param name=></param>
 /// <returns></returns>
 public JobSeekerGrade MappingJobSeekerGradeupdateDTOToJobSeekerGrade(JobSeekerGrade jobSeekerGrade, JobSeekerGradeUpdateDTO JobSeekerGradeUpdateDTO)
 {
     #region Declare Return Var with Intial Value
     JobSeekerGrade JobSeekerGrade = jobSeekerGrade;
     #endregion
     try
     {
         if (JobSeekerGradeUpdateDTO.JobSeekerGradeId > default(int))
         {
             JobSeekerGrade.JobSeekerGradeId   = JobSeekerGradeUpdateDTO.JobSeekerGradeId;
             JobSeekerGrade.JobSeekerGradeName = JobSeekerGradeUpdateDTO.JobSeekerGradeName;
         }
     }
     catch (Exception exception) { }
     return(JobSeekerGrade);
 }