/// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IResult GetRequestsList(SearchSortModel search)
        {
            var requestViewModels = new List <ComeToOfficeRequestViewModel>();
            var result            = new Result
            {
                Operation  = Operation.Read,
                Status     = Status.Success,
                StatusCode = HttpStatusCode.OK
            };

            try
            {
                var requests = _requestRepository.GetRequestsList(search);
                if (requests.Any())
                {
                    requestViewModels = requests.Select(t =>
                    {
                        var requestViewModel = new ComeToOfficeRequestViewModel();
                        requestViewModel.MapFromModel(t);
                        var employeeVm = new EmployeeViewModel();
                        employeeVm.MapFromModel(t.Employee);
                        requestViewModel.Employee = employeeVm;

                        return(requestViewModel);
                    }).ToList();
                }
                else
                {
                    result.Message = "No records found";
                }
                search.SearchResult = requestViewModels;
                result.Body         = search;
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, ex.Message);
                result.Status     = Status.Error;
                result.Message    = ex.Message;
                result.StatusCode = HttpStatusCode.InternalServerError;
            }
            return(result);
        }
        /// <summary>
        /// Returns Request detail
        /// </summary>
        /// <param name="requestId"></param>
        /// <returns></returns>
        public async Task <IResult> GetRequestDetail(int requestId)
        {
            var requestViewModel = new ComeToOfficeRequestViewModel();
            var result           = new Result
            {
                Operation  = Operation.Read,
                Status     = Status.Success,
                StatusCode = HttpStatusCode.OK
            };

            try
            {
                var request = await _requestRepository.GetRequestById(requestId);

                if (request != null)
                {
                    requestViewModel.MapFromModel(request);
                    var employeeVm = new EmployeeViewModel();
                    employeeVm.MapFromModel(request.Employee);
                    requestViewModel.Employee = employeeVm;
                }
                else
                {
                    result.Message = "No record found matching Id";
                }
                result.Body = requestViewModel;
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, ex.Message);
                result.Status     = Status.Error;
                result.Message    = ex.Message;
                result.StatusCode = HttpStatusCode.InternalServerError;
            }
            return(result);
        }