public async Task <ActionResult> EditSupplierModal(int supplierId) { var module = await _supplierAppService.Get(new EntityDto <int>(supplierId)); var config = new MapperConfiguration(cfg => cfg.CreateMap <SupplierDto, CreateUpdateSupplierDto>()); var mapper = config.CreateMapper(); CreateUpdateSupplierDto cuSupplier = mapper.Map <CreateUpdateSupplierDto>(module); var model = new EditSupplierModalViewModel { Supplier = cuSupplier }; return(View("_EditSupplierModal", model)); }
public IActionResult Get(Guid id) { var dto = _service.Get(id); return(Json(dto)); }