The program has an update button which sends a request to the server. My task is that when you click on the button, the request to the server is started in a separate asynchronous thread, and on the user interface (wpf) a image "spinner-loading" appears. I get an error: 

> 
> "Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type". 
> 
> 
> 

How can I combine `async` and `void` or, can I do something any better?

ViewModel:

```
public CarasViewModel()
    {
      ...
     AddCommand = new AsyncCommand<Task>(() => Add());
      ...
    }

public IAsyncCommand AddCommand { get; private set; }
    async Task Add()
    {
        await Task.Run(() => OnAdd());
    }

void OnAdd()
    {
        var Result = Helper.Get(Configuration.Settings);
        if (Result != null)
        {
            var SelectionViewModel = new SelectionViewModel(Result);
            if (DialogService.ShowModalWindow(selectionViewModel))
            {
                ...
            }
        }
        else
        {
            MessageBoxService.ShowError("Check your connection settings.");
        }
    }

```

code snippet AsyncCommand:

```
public class AsyncCommand<TResult> : AsyncCommandBase, INotifyPropertyChanged
{
    private readonly Func<Task<TResult>> _command;
    private NotifyTaskCompletion<TResult> _execution;

    public AsyncCommand(Func<Task<TResult>> command)
    {
        _command = command;
    }
...

```