コード例 #1
0
        public ActionResult <CompanyResponse> GetCompanyByIdWithEmployees(int id)
        {
            try
            {
                var result = _companyAppService.GetCompanyByIdWithEmployees(id);
                if (result == null)
                {
                    return(CustomResponse());
                }

                var listCompanyResponse = _mapper.Map <Company, CompanyResponse>(result);
                return(CustomResponse(listCompanyResponse));
            }
            catch (Exception ex)
            {
                MessageException();
                return(CustomExceptionResponse());
            }
        }