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());
        }
示例#2
0
        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"));
        }
示例#3
0
 public JsonResult DeleteTask(DeleteTaskViewModel model)
 {
     toDoItemService.Delete(model);
     return(JsonHelper.SuccessJsonResult());
 }
示例#4
0
        public async Task <IActionResult> DeleteItem(Guid itemId)
        {
            await _itemService.Delete(itemId);

            return(StatusCode(204));
        }