diff --git a/ContosoUniversity/Pages/Departments/Delete.cshtml.cs b/ContosoUniversity/Pages/Departments/Delete.cshtml.cs index 97772a0..40f5d92 100644 --- a/ContosoUniversity/Pages/Departments/Delete.cshtml.cs +++ b/ContosoUniversity/Pages/Departments/Delete.cshtml.cs @@ -30,7 +30,7 @@ public async Task OnPostAsync() { await _mediator.Send(Data); - return this.RedirectToPageJson("Index"); + return this.RedirectToPageJson(nameof(Index)); } public record Query : IRequest @@ -93,4 +93,4 @@ public async Task Handle(Command message, CancellationToken token) } } } -} \ No newline at end of file +}