Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        private GetCompanyResponseMessage OnGetCompanyMessage(GetCompanyMessage message)
        {
            var company = companyLogic.GetCompany(message.CompanyId);

            var responseMessage = new GetCompanyResponseMessage
            {
                Company = company
            };

            return(responseMessage);
        }