-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Working with the Project and Adding New Features using Visual Studio for Mac
Let's add a new feature to the site that will allow authenticated users to view the current status of their orders. Orders should display their status on the Orders page, which should have the following options:
- Pending
- Out for Delivery
- Delivered
Clicking on the link should present the user with more detailed information. In the case of Pending, nothing else will be shown. Out for Delivery should provide an estimate for when the order will be delivered. Delivered should note the time when the order was delivered.
We can start on this feature from either end, working from the domain model first or from the UI first. In this case, since there's not much domain logic involved and the UI is pretty straightforward, let's start with the UI. First, we need to update the Orders view so that it displays the current order status of each order, which should a link to the order details page that will show more details about the status.
Next, we need to construct the order details page, including the information on the order's delivery status.
These changes will force us to modify the ViewModel used by Orders so that we can display the appropriate order status and related details.
In order to populate the ViewModel, we'll need to get the order status information from our domain model. So, we'll add that information. We will also need to know when an order was delivered, so we'll need to add that to the Order model as well.
Once we've made our changes, we can update the database by adding new migrations and then calling dotnet ef database update
with the appropriate arguments. At this point, we're ready to run the application and see if it works.
- Getting Started for Beginners (with video)
-
Walkthroughs
- Deploying to Azure App Service from Visual Studio
- Deploying to Azure App Service from Azure Portal
- Deploying to Azure App Service from Visual Studio for Mac
- Running as a Linux Container locally in Visual Studio
- Deploying as a Linux Container into Azure App Service
- Running in a Windows Container locally in Visual Studio
- Running as a Linux Container locally in Visual Studio for Mac
- Deploying as a Windows Container into a Windows Container host in Azure
- Working with the Project and Adding New Features using Visual Studio for Mac