/// <summary>
        /// Get WorkHistory by PersonId
        /// </summary>
        /// <param name="personId"></param>
        /// <returns></returns>
        public async Task <IEnumerable <SaveWorkHistoryResource> > GetWorkHistoryByPersonId(int id)
        {
            var tempWorkHistoryInfo = await _workHistoryRepository.FindAsyncByPersonId(id);

            // List is null
            List <SaveWorkHistoryResource> lists = new List <SaveWorkHistoryResource>();

            foreach (var item in tempWorkHistoryInfo)
            {
                var tempStartDate   = string.Format(item.StartDate.ToString("MM/yyyy"));
                var tempEndDate     = (item.EndDate is null) ? string.Empty : string.Format(item.EndDate?.ToString("MM/yyyy"));
                var tempWorkHistory = new SaveWorkHistoryResource()
                {
                    Id          = item.Id,
                    Position    = item.Position,
                    OrderIndex  = item.OrderIndex,
                    CompanyName = item.CompanyName,
                    StartDate   = tempStartDate,
                    EndDate     = tempEndDate,
                    PersonId    = item.PersonId
                };
                lists.Add(tempWorkHistory);
            }
            // Sort list
            var result = lists?.OrderBy(x => x.OrderIndex);

            return(result);
        }
        /// <summary>
        /// Get WorkHistory by Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <SaveWorkHistoryResource> GetWorkHistoryById(int id)
        {
            var tempWorkHistoryInfo = await _workHistoryRepository.FindAsync(id);

            var tempStartDate   = string.Format(tempWorkHistoryInfo.StartDate.ToString("MM/yyyy"));
            var tempEndDate     = (tempWorkHistoryInfo.EndDate is null) ? string.Empty : string.Format(tempWorkHistoryInfo.EndDate?.ToString("MM/yyyy"));
            var tempWorkHistory = new SaveWorkHistoryResource()
            {
                Id          = tempWorkHistoryInfo.Id,
                Position    = tempWorkHistoryInfo.Position,
                OrderIndex  = tempWorkHistoryInfo.OrderIndex,
                CompanyName = tempWorkHistoryInfo.CompanyName,
                StartDate   = tempStartDate,
                EndDate     = tempEndDate,
                PersonId    = tempWorkHistoryInfo.PersonId
            };

            return(tempWorkHistory);
        }