public IActionResult Delete(string id) { var title = _plannerService.Get(id); if (title == null) { return(NotFound()); } _plannerService.Delete(title.Id); return(NoContent()); }
public Result Delete(Planner planner) { var result = new Result(); try { PlannerService plannerService = new PlannerService(); plannerService.Delete(planner); result.IsSuccess = true; } catch (Exception exception) { result.IsSuccess = false; result.ExceptionInfo = exception; } return(result); }