Delete REST API Code Generation

I have defined a Restful-Api Data Source which has a Delete Method configured like this:

It seems to what looks like reasonable code in the Service for the DataSource like this:

  public async Task DeleteContributor(int id)
        {
            var uri = new Uri(httpClient.BaseAddress, $"Contributors/{id}");

            var request = new HttpRequestMessage(HttpMethod.Delete, uri);

            OnDeleteContributor(request);

            var response = await httpClient.SendAsync(request);

            response.EnsureSuccessStatusCode();

            OnDeleteContributorResponse(response);
        }

However the code in the Grid for the Delete Button is expecting a Deletion Result:

 protected async Task GridDeleteButtonClick(MouseEventArgs args, AAF2.RadzenStudio.API.Server.Models.AAF2.Contributor contributor)
        {
            try
            {
                if (await DialogService.Confirm("Are you sure you want to delete this record?") == true)
                {
                    var deleteResult = await AAF2Service.DeleteContributor(contributor.Id);

                    if (deleteResult != null)
                    {
                        await grid0.Reload();
                    }
                }
            }
            catch (Exception ex)
            {
                NotificationService.Notify(new NotificationMessage
                {
                    Severity = NotificationSeverity.Error,
                    Summary = $"Error",
                    Detail = $"Unable to delete Contributor"
                });
            }
        }

I've looked for an example of deletion in the documentation and the sample apps but there isn't one I can find, what should this code look like ?

Hi @johnkattenhorn,

This seems to be an issue with the code generated for a REST data source. It shouldn't expect a result to be returned. You can try modifying the code like this:

if (await DialogService.Confirm("Are you sure you want to delete this record?") == true)
{
    await AAF2Service.DeleteContributor(contributor.Id);

    await grid0.Reload();
}

Great, thanks for confirming - this is want I did - but good to confirm