The ASP.NET MVC Framework has always been a good platform on which to implement REST-based services, but the introduction of the ASP.NET Web API Framework raised the bar to a whole new level.Now in release version 2.1, the Web API Framework has evolved into a powerful and refreshingly usable platform. This concise book provides technical background and guidance that will enable you to best use the ASP.NET Web API 2 Framework to build world-class REST services.
New content in this edition includes:
• New capabilities in Web API 2 (currently version 2.1).
• Support for partial updates, or PATCH.
• API versioning.
• Support for legacy SOAP-based operations.
• How to handle non-resource APIs using REST
• How to best expose relationships between resources
• JSON Web Tokens, CORS, CSRF
Get ready for authors Jamie Kurtz and Brian Wortman to take you from zero to REST service hero in no time at all. No prior experience with ASP.NET Web API is required; all Web API-related concepts are introduced from basic principles and developed to the point where you can use them in a production system. A good working knowledge of C# and the .NET Framework are the only prerequisites to best benefit from this book.
Table of contents
- Contents at a Glance
- About the Authors
- About the Technical Reviewers
Chapter 1: ASP.NET as a Service Framework
- Advantages of Using the ASP.NET Web API
- A Few Feature Highlights of the ASP.NET Web API
- Chapter 2: What Is RESTful?
- Chapter 3: Designing the Sample REST API
- Chapter 4: Building the Environment and Creating the Source Tree
Chapter 5: Up and Down the Stack with a POST
- NHibernate Configuration and Mappings
- Managing the Unit of Work
- Database Transaction Control
- Diagnostic Tracing
- Error Handling
- Persisting a Task and Returning IHttpActionResult
Chapter 6: Securing the Service
- The Main Idea
- Securing the POST
- Securing Non-Resource API Operations
- GET a Task
- Applying Token-Based Security
- SSL, XSS, CORS, and CSRF
Chapter 7: Dealing with Relationships, Partial Updates, and Other Complexities
- Task and User Relationships
- Partial Update of a Task Using PUT/PATCH
- Validation Using an Action Filter
- Paging of Results
- Hypermedia Links
- Chapter 8: Supporting Diverse Clients
- Chapter 9: Completing the Picture
- Title: ASP.NET Web API 2: Building a REST Service from Start to Finish
- Release date: August 2014
- Publisher(s): Apress
- ISBN: 9781484201091
You might also like
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …
Dependency Injection Principles, Practices, and Patterns
Dependency Injection Principles, Practices, and Patterns is a revised and expanded edition of the bestselling classic …
Building RESTful Web Services with .NET Core
Building Complete E-commerce/Shopping Cart Application About This Book Follow best practices and explore techniques such as …