lahaniche.blogg.se

Razer sql
Razer sql






razer sql

(Line: 18) The 'CakVm' displays the data on the delete confirmation page.(Line: 17) The 'ErrorMessage' property display the delete error message.

razer sql

There is an option to customize the name of the HTTP GET request method then it should be like 'OnGet&saveChangesError=true") It is always ideal to have one method for each HTTP verbs like 'GET', 'POST'.

  • (Line: 18-22) The default method executed for the razor page HTTP Get request is 'OnGet' or 'OnGetAsync'.
  • (Line: 16) Declared a variable of a type that is collection 'Cake' to hold the data from the database and then bind the data to the UI.
  • (Line: 11) Injecting Database context into our Razor Page model.
  • (Line: 8) To make our c# class as Razor Page model it needs to inherit the '.PageModel'.
  • razer sql

    Public IndexModel(MyWorldDbContext myWorldDbContext)ĪllCakes = await _() Private readonly MyWorldDbContext _myWorldDbContext








    Razer sql