Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public IActionResult Get(Guid id)
        {
            var dto = _service.Get(id);

            return(Json(dto));
        }