In this assignment we will recreate the Order web service as a REST service, and create a basic Angular front end application that interfaces with it.
Create the C# models that are needed to represent the Order documents that are used in the order web service. For this, please see the following links:
Create a OrderService class that will initialize a data structure that holds 2 orders. In addition, this class should contain the following methods:
· GetOrders: gets a list of orders. The data returned contains the same data returned in the GetOrders web service method.
· GetOrder: accepts one integer parameter that represents the order ID. The data returned contains the same data returned in the GetOrders web service method.
· UpdateTrackingNumber: has the following parameters: a string that represents a tracking number, and an integer that represents the order ID. This method returns “Tracking number updated” if the order is found, otherwise returns null.
Create a controller class called OrderController that contains the following 3 endpoints (methods):
· One endpoint to get the list orders.
· One endpoint to get the order details.
· One endpoint to update the tracking number for a given order.
Use the appropriate HTTP methods (Verbs) and routes.
Create a new Angular application. Add a new component that will call the service to get the list of orders and show the on the page. Make the order Id a link that navigates to a different route. That route should contain the order ID
Create a component that will use get the order Id from the route and then call the service to get the order details and display them on the page.
Add a textbox and a button in the order details component. In the click event for the button make a call to the service to update the tracking number for that order. on success reload the order details.