Пример #1
0
        public IActionResult Delete(int id)
        {
            var actor = _actorRepository.GetById(id);

            _actorRepository.Delete(actor);

            return(RedirectToAction("List"));
        }
Пример #2
0
        public async Task <IActionResult> Delete(string id)
        {
            var model = await _actorRepo.GetActor(id);

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

            await _actorRepo.Delete(model);

            return(Ok());
        }