private async Task InternalDeleteAsync(DeleteTodoItemInfo deleteTodoItemInfo)
        {
            TodoItem existingTodoItem = await GetExistingTodoItem(deleteTodoItemInfo.Id, deleteTodoItemInfo.Owner);

            todoDbContext.TodoItems.Remove(existingTodoItem);
            await todoDbContext.SaveChangesAsync();

            logger.LogInformation("Item with id {TodoItemId} has been deleted by user [{User}]"
                                  , deleteTodoItemInfo.Id, deleteTodoItemInfo.Owner.GetName());
        }
        public Task DeleteAsync(DeleteTodoItemInfo deleteTodoItemInfo)
        {
            if (deleteTodoItemInfo == null)
            {
                throw new ArgumentNullException(nameof(deleteTodoItemInfo));
            }

            Validator.ValidateObject(deleteTodoItemInfo, new ValidationContext(deleteTodoItemInfo),
                                     validateAllProperties: true);

            return(InternalDeleteAsync(deleteTodoItemInfo));
        }