I need to assign async Task
method to a multicastdelegate parameter as follows.
protected async Task GridRowSelect(Employee emp)
{
await Service.SetRowSelect(emp.Id);
}
gridSettings.RowSelect = new EventCallback<Employee>(this, (Action<Employee>)GridRowSelect);
But it gives an error.
'Task GridRowSelect(Employee) has the wrong return type'
If I change async Task
to async void
this is working. But is that the correct way?