예제 #1
0
        // GET: UOMs/Details/5
        public async Task <IActionResult> Details(int?id, UOMViewmodel vm)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var UOM = await _uOMRepository.GetByIdAsync(id);

            _Mapper.Map(vm, UOM);

            if (UOM == null)
            {
                return(NotFound());
            }

            return(View(_Mapper.Map <UOMViewmodel>(UOM)));
        }
예제 #2
0
        public async Task <IActionResult> Details(int?id, UOMDTO dto)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var uom = await _uomRepository.GetByIdAsync(id);

            var cto = _mapper.Map <CountryDTO>(uom);

            if (uom == null)
            {
                return(NotFound());
            }
            return(Ok(cto));
        }