public async Task <IActionResult> Delete(int id)
        {
            await _ideaService.Delete(id);

            return(new NoContentResult());

            // todo: return NotFound();
        }
        public async Task <IActionResult> Delete(Idea model)
        {
            try
            {
                await _ideaService.Delete(model);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex));
            }
        }
示例#3
0
 public ActionResult DeleteConfirmed(int id)
 {
     _ideaService.Delete(id);
     return(RedirectToAction(DefaultActions.Index));
 }