Manipulating Data Using Razor Pages
Learn about enabling model functionality in ASP.NET Core using Razor Pages, including modifying models, defining forms, and injecting dependency services into Razor Pages.
We will now add functionality to insert a new supplier
Enabling a model to insert entities
First, we will modify the supplier model so that it responds to HTTP POST requests when a visitor submits a form to insert a new supplier:
Step 1: In the Northwind.Web
project, in the Pages
folder, open Suppliers.cshtml.cs
and import the following namespace:
Get hands-on with 1400+ tech skills courses.