You should add that in
[CascadingParameter] MudDialogInstance MudDialog { get; set; }
TestDialog.razor.cs