Esempio n. 1
0
        public IActionResult Delete(int?id)
        {
            if (id == null && id == 0)
            {
                return(BadRequest());
            }

            var child = _repository.GetChildren((int)id);

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

            _repository.Delete(child);

            return(RedirectToAction("Details", "Group", new { id = child.GroupId }));
        }
 public void Delete(long id)
 {
     _childrenRepository.Delete(id);
 }