/// <summary>
        /// Delete User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> DeleteJobSeekerApply(int JobSeekerApplyId)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerApplyDeleted = default(bool);
            #endregion
            try
            {
                if (JobSeekerApplyId > default(int))
                {
                    #region Vars
                    JobSeekerApply JobSeekerApply = null;
                    #endregion
                    #region Get JobSeekerApply by id
                    JobSeekerApply = await UnitOfWork.JobSeekerApplyRepository.GetById(JobSeekerApplyId);

                    #endregion
                    #region check if object is not null
                    if (JobSeekerApply != null)
                    {
                        JobSeekerApply.IsDeleted = (byte)DeleteStatusEnum.Deleted;
                        #region Apply the changes to the database
                        UnitOfWork.JobSeekerApplyRepository.Update(JobSeekerApply);
                        isJobSeekerApplyDeleted = await UnitOfWork.Commit() > default(int);

                        #endregion
                    }
                    #endregion
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerApplyDeleted);
        }
 /// <summary>
 /// Mapping User Activity Log DTO to Action
 /// </summary>
 /// <param name=></param>
 /// <param name=></param>
 /// <returns></returns>
 public JobSeekerApply MappingJobSeekerApplyupdateDTOToJobSeekerApply(JobSeekerApply jobSeekerApply, JobSeekerApplyUpdateDTO JobSeekerApplyUpdateDTO)
 {
     #region Declare Return Var with Intial Value
     JobSeekerApply JobSeekerApply = jobSeekerApply;
     #endregion
     try
     {
         if (JobSeekerApplyUpdateDTO.JobSeekerApplyId > default(int))
         {
             JobSeekerApply.JobSeekerId            = JobSeekerApplyUpdateDTO.JobSeekerId;
             JobSeekerApply.ApplyDate              = JobSeekerApplyUpdateDTO.ApplyDate;
             JobSeekerApply.JobSeekerApplyId       = JobSeekerApplyUpdateDTO.JobSeekerApplyId;
             JobSeekerApply.JobSeekerApplyStatusId = JobSeekerApplyUpdateDTO.JobSeekerApplyStatusId;
             JobSeekerApply.PostId = JobSeekerApplyUpdateDTO.PostId;
         }
     }
     catch (Exception exception) { }
     return(JobSeekerApply);
 }
 /// <summary>
 /// Mapping user Action Actitvity Log
 /// </summary>
 /// <param name=></ param >
 /// <returns>Task<JobSeekerApply></returns>
 public JobSeekerApply MappingJobSeekerApplyAddDTOToJobSeekerApply(JobSeekerApplyAddDTO JobSeekerApplyAddDTO)
 {
     #region Declare a return type with initial value.
     JobSeekerApply JobSeekerApply = null;
     #endregion
     try
     {
         JobSeekerApply = new JobSeekerApply
         {
             JobSeekerId            = JobSeekerApplyAddDTO.JobSeekerId,
             ApplyDate              = DateTime.Now,
             JobSeekerApplyStatusId = JobSeekerApplyAddDTO.JobSeekerApplyStatusId,
             PostId       = JobSeekerApplyAddDTO.PostId,
             CreationDate = DateTime.Now,
             IsDeleted    = (byte)DeleteStatusEnum.NotDeleted
         };
     }
     catch (Exception exception) { }
     return(JobSeekerApply);
 }
        /// <summary>
        /// Get user Action Activity Log By Id
        /// </summary>
        /// <returns>List<JobSeekerApplyReturnDTO></returns>
        public async Task <JobSeekerApplyReturnDTO> GetJobSeekerApplyById(int JobSeekerApplyId)
        {
            #region Declare a return type with initial value.
            JobSeekerApplyReturnDTO JobSeekerApply = new JobSeekerApplyReturnDTO();
            #endregion
            try
            {
                JobSeekerApply jobSeekerApply = await UnitOfWork.JobSeekerApplyRepository.GetById(JobSeekerApplyId);

                if (jobSeekerApply != null)
                {
                    if (jobSeekerApply.IsDeleted != (byte)DeleteStatusEnum.Deleted)
                    {
                        JobSeekerApply = JobSeekerApplyMapping.MappingJobSeekerApplyToJobSeekerApplyReturnDTO(jobSeekerApply);
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(JobSeekerApply);
        }
        /// <summary>
        /// Create User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> AddJobSeekerApply(JobSeekerApplyAddDTO JobSeekerApplyAddDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerApplyCreated = default(bool);
            #endregion
            try
            {
                #region Vars
                JobSeekerApply JobSeekerApply = null;
                #endregion
                JobSeekerApply = JobSeekerApplyMapping.MappingJobSeekerApplyAddDTOToJobSeekerApply(JobSeekerApplyAddDTO);
                if (JobSeekerApply != null)
                {
                    await UnitOfWork.JobSeekerApplyRepository.Insert(JobSeekerApply);

                    isJobSeekerApplyCreated = await UnitOfWork.Commit() > default(int);
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerApplyCreated);
        }
        /// <summary>
        /// Update User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> UpdateJobSeekerApply(JobSeekerApplyUpdateDTO JobSeekerApplyUpdateDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerApplyUpdated = default(bool);
            #endregion
            try
            {
                if (JobSeekerApplyUpdateDTO != null)
                {
                    #region Vars
                    JobSeekerApply JobSeekerApply = null;
                    #endregion
                    #region Get Activity By Id
                    JobSeekerApply = await UnitOfWork.JobSeekerApplyRepository.GetById(JobSeekerApplyUpdateDTO.JobSeekerApplyId);

                    #endregion
                    if (JobSeekerApply != null)
                    {
                        #region  Mapping
                        JobSeekerApply = JobSeekerApplyMapping.MappingJobSeekerApplyupdateDTOToJobSeekerApply(JobSeekerApply, JobSeekerApplyUpdateDTO);
                        #endregion
                        if (JobSeekerApply != null)
                        {
                            #region  Update Entity
                            UnitOfWork.JobSeekerApplyRepository.Update(JobSeekerApply);
                            isJobSeekerApplyUpdated = await UnitOfWork.Commit() > default(int);

                            #endregion
                        }
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerApplyUpdated);
        }
 public JobSeekerApplyReturnDTO MappingJobSeekerApplyToJobSeekerApplyReturnDTO(JobSeekerApply JobSeekerApply)
 {
     #region Declare a return type with initial value.
     JobSeekerApplyReturnDTO JobSeekerApplyReturnDTO = null;
     #endregion
     try
     {
         if (JobSeekerApply != null)
         {
             JobSeekerApplyReturnDTO = new JobSeekerApplyReturnDTO
             {
                 JobSeekerId            = JobSeekerApply.JobSeekerId,
                 ApplyDate              = JobSeekerApply.ApplyDate,
                 JobSeekerApplyId       = JobSeekerApply.JobSeekerApplyId,
                 JobSeekerApplyStatusId = JobSeekerApply.JobSeekerApplyStatusId,
                 PostId = JobSeekerApply.PostId
             };
         }
     }
     catch (Exception exception)
     { }
     return(JobSeekerApplyReturnDTO);
 }