Question: C# Write a Web API controller for weather. The controller level route should be api/weather. Implement an action to get temperature which returns 62. Implement
C#
- Write a Web API controller for weather.
- The controller level route should be api/weather.
- Implement an action to get temperature which returns 62.
- Implement an action that changes from fahrenheit to celsius.
- Action route should be tocelsius
- Should accept only a route parameter for degrees
- Return the converted value (make sure to actually do the calculation.
- implement an action that changes from celsius to fahrenheit.
- Action route should be tofahrenheit
- Should accept only a query parameter for degrees
- Return the converted value
- Use appropriate verbs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
