Building and Testing Customer Components
Learn about creating a shared component and components for full CRUD operations on customer records and testing operations of customer data.
Building a shared customer detail component
Next, we will create a shared component to show the details of a customer. This will only be a component, never a page:
Step 1: In the Northwind.BlazorServer
project, in the Shared
folder, create a new file named CustomerDetail.razor
. (The Visual Studio 2022 project item template is named Razor Component.)
Step 2: Modify its contents to define a form to edit the properties of a customer, as shown in the following code:
Get hands-on with 1400+ tech skills courses.