Example #1
0
        public ToDoList DeleteList(int listId)
        {
            var items = _itemRepo.GetListItems(listId);

            _itemRepo.DeleteItems(items);
            return(_listRepo.DeleteList(listId));
        }
Example #2
0
        /// <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);
        }
Example #3
0
        public ActionResult Delete(string id)
        {
            try
            {
                var result = list_repo_.DeleteList(id);

                return(this.Ok());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #4
0
        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);
        }
Example #5
0
 public IActionResult DeleteList(int listid)
 {
     _listRepository.DeleteList(listid);
     return(Redirect("~/Dashboard"));
 }
Example #6
0
 public void DeleteList(TList list)
 {
     _listRepository.DeleteList(list);
 }