Close dialog from parent page

When I submit form I would like to show dialog with information that app is saving data. When data are saved dialog should be automatically closed. I assume that my code should have three steps:

  1. open dialog (using OpenAsync?) with simple message "Saving data - please wait...",
  2. save data to database
  3. close dialog opened in step 1

I have no idea how to achieve step 3 - how to close dialog from code behind on my page with form.

O.K. - I got it:
@inject DialogService ds
// 1st step
ds.OpenAsync("", html => @

Saving - please wait...
// 2nd step
// 3rd step