public IActionResult DeleteTitle(Guid id) { var list = _toDoItemService.GetList(c => c.ToDoTitleId == id).Data; list.ForEach(c => _toDoItemService.Delete(c)); var a = _toDoTitleDal.Get(c => c.Id == id); var title = _toDoTitleService.Get(c => c.Id == id).Data; _toDoTitleService.Delete(title); return(Ok()); }
public IActionResult DeleteCard(int?id) { if (id == null) { return(RedirectToAction("Index")); } var entity = _toDoItemService.GetById((int)id); if (entity != null) { _toDoItemService.Delete(entity); } return(RedirectToAction("Index")); }
public JsonResult DeleteTask(DeleteTaskViewModel model) { toDoItemService.Delete(model); return(JsonHelper.SuccessJsonResult()); }
public async Task <IActionResult> DeleteItem(Guid itemId) { await _itemService.Delete(itemId); return(StatusCode(204)); }