Exemplo n.º 1
0
        public async Task <PartialViewResult> CreateOrEditModal(int?id)
        {
            CompanyEditDto dto;

            if (id.HasValue)
            {
                dto = await _companyAppService.GetCompanyForEdit(new EntityDto(id.Value));
            }
            else
            {
                dto = new CompanyEditDto();
            }

            var model = new EditViewModel(dto, _channelCache.GetAll(), ObjectMapper);

            return(PartialView("_CreateOrEditModal", model));
        }