5. web api 2 aspdotnet-mvc5-slides

1,516 views

Published on

Video : https://www.youtube.com/watch?v=NEvRfi3NXqU&list=PLLQgkMVoGtcuG1Upbgjnf9Xhlx_MIXrZM&index=2

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,516
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

5. web api 2 aspdotnet-mvc5-slides

  1. 1. ASP.NET MVC 5 Fundamentals WebApi 2 K. Scott Allen OdeToCode.com @OdeToCode
  2. 2. Routing With Attributes Route Description [Route("patients/{id}/medications")] Easier to get to "nested" resources [Route["patients/{id:int:min(1)}"] Constraints [Route("patients/{id:int}")] [Route["patients/{name:alpha}"] Multiple routes per action [Route("patients/{id?}")] Can apply to entire controller [RoutePrefix("api/patients")] Prefix for all other routes in controller [RouteArea("Admin")] Attributes for MVC Areas
  3. 3. IHttpActionResult
  4. 4. CORS  Cross Origin Resource Sharing Origin: http://pluralsight.com Access-Control-Allow-Origin: http://pluralsight.com
  5. 5. Summary

×