Пример #1
0
        public async Task Should_Get_Single_Supplier()
        {
            //Act
            var result = await _supplierAppService.GetAsync(1);

            //Assert
            result.ShouldNotBeNull();
        }
Пример #2
0
        public async Task <ActionResult> EditSupplierModal(int supplierId)
        {
            var module = await _supplierAppService.GetAsync(new EntityDto <int>(supplierId));

            var mapper = new MapperConfiguration(cfg => cfg.CreateMap <SupplierDto, CreateUpdateSupplierDto>()).CreateMapper();
            CreateUpdateSupplierDto cuSupplier = mapper.Map <CreateUpdateSupplierDto>(module);
            var model = new EditSupplierModalViewModel
            {
                Supplier = cuSupplier
            };

            return(View("_EditSupplierModal", model));
        }