public async Task <int> Handle(UpdateToDoItemCommand request, CancellationToken cancellationToken)
        {
            int userId = _userAccessor.GetUserId();

            request.ToDoItem.UserId = userId;
            var      db   = _instanceDB.Get <IToDoItemDbManager>();
            ToDoItem item = _dtoMapper.MapItemDTOToUpdateEntity(request.ToDoItem);

            return(await db.UpdateToDoItem(item));
        }
        public async Task <int> Handle(UpdatePatchToDoItemCommand request, CancellationToken cancellationToken)
        {
            var      db    = _instanceDB.Get <IToDoItemDbManager>();
            ToDoItem item  = _dtoMapper.MapItemDTOToUpdateEntity(await db.GetToDoItem(request.ItemId));
            var      patch = _patchToDo.ItemToCommand(item);

            if (item != null)
            {
                request.JsonPatchDocument.ApplyTo(patch);
            }
            return(await db.UpdateToDoItem(item));
        }