コード例 #1
0
        public ActionResult RemoveCompany(int id)
        {
            try
            {
                var company = _companyAppService.GetCompanyById(id);
                if (company == null)
                {
                    AdicionarErroProcessamento("Não foi possível localizar a empresa pelo id informado.");
                    return(CustomResponse());
                }

                _companyAppService.RemoveCompany(company);
                return(CustomResponse());
            }
            catch (Exception ex)
            {
                MessageException();
                return(CustomExceptionResponse());
            }
        }