public IActionResult Edit([FromRoute] int id) { var message = new GetCompanyMessage { CompanyId = id }; var responseMessage = bus.Request <GetCompanyMessage, GetCompanyResponseMessage>(message); var editCompanyViewModel = mapper.Map <EditCompanyViewModel>(responseMessage.Company); return(View(editCompanyViewModel)); }
private GetCompanyResponseMessage OnGetCompanyMessage(GetCompanyMessage message) { var company = companyLogic.GetCompany(message.CompanyId); var responseMessage = new GetCompanyResponseMessage { Company = company }; return(responseMessage); }