public ToDoList DeleteList(int listId) { var items = _itemRepo.GetListItems(listId); _itemRepo.DeleteItems(items); return(_listRepo.DeleteList(listId)); }
/// <summary> /// /// </summary> /// <param name="Lists"></param> /// <returns></returns> public bool DeleteList(ListDTO Lists) { var result = false; TblList list = _mapper.Map <TblList>(Lists); result = _listRepository.DeleteList(list); return(result); }
public ActionResult Delete(string id) { try { var result = list_repo_.DeleteList(id); return(this.Ok()); } catch (Exception ex) { throw ex; } }
public ListDto DeleteList(DeleteListDto deleteListDto, string userId) { if (!_listRepository.IsOwner(deleteListDto.ListId, userId)) { return(null); } var list = _listRepository.GetList(deleteListDto.ListId); if (list == null) { return(null); } var deletedList = _listRepository.DeleteList(list); var listsWithPositionToUpdate = GetCardsWithPositionToDecrease(deletedList.BoardId, deletedList.Position); _listRepository.UpdateListsPosition(listsWithPositionToUpdate); var result = _mapper.Map <ListDto>(deletedList); return(result); }
public IActionResult DeleteList(int listid) { _listRepository.DeleteList(listid); return(Redirect("~/Dashboard")); }
public void DeleteList(TList list) { _listRepository.DeleteList(list); }