예제 #1
0
        public ActionResult Delete(int id)
        {
            if (_repository.Buscar(id) == null)
            {
                return(NotFound());
            }

            _repository.Remover(id);
            _repository.Salvar();
            return(NoContent());
        }
예제 #2
0
 public ActionResult Delete(int id, Tipo collection)
 {
     try
     {
         // TODO: Add delete logic here
         _tipoRepository.Remover(collection);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
예제 #3
0
파일: TipoService.cs 프로젝트: cjcossa/SDGE
 public void Remover(Tipo entity)
 {
     _tipoRepository.Remover(entity);
 }