Пример #1
0
        public async Task <IActionResult> Edit(int id, Products data)
        {
            if (ModelState.IsValid)
            {
                data = await prdRepository.UpdateAync(id, data);

                return(RedirectToAction("Index"));
            }
            return(View(data));
        }
        public async Task <IActionResult> Put(int id, Categories input)
        {
            if (ModelState.IsValid)
            {
                var result = await catRepository.UpdateAync(id, input);

                return(Ok(result));
            }
            return(BadRequest(ModelState));
        }