ASP.NET Web API 2: Building a REST Service from Start to Finish, Second Edition

  • 3h 46m
  • Brian Wortman, Jamie Kurtz
  • Apress
  • 2014

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.

What you’ll learn

  • Introduction to the REST architecture
  • How to design a REST API
  • New capabilities in ASP.NET Web API 2
  • Understanding ASP.NET Web API controller activation
  • Automatic lifetime management for database connections and transactions
  • Using NHibernate with ASP.NET Web API
  • Easily secure a REST service, using standards-based authentication and authorization and JSON Web Tokens
  • Supporting legacy SOAP callers with ASP.NET Web API
  • How to expose relationships between resources
  • Supporting partial resource updates under REST
  • Web API versioning

Who this book is for

Intermediate level developers in .NET, REST, C#

About the Authors

Jamie Kurtz has over 17 years of experience working in a variety of roles as engineer and solution provider. While working as a developer and tester for an education software company, and working as a developer in a high-temperature super conductivity lab, he received his Bachelor of Science from Western Michigan University—double majoring in Physics and Mathematics and minoring in Computer Science.

From there, Jamie worked in DBA, project lead, team lead, manager, architect, advisor, tester, and developer roles in various industries, including: telecommunications, fulfillment, manufacturing, banking, and video intelligence/security. He is currently working as consultant and group manager at Fusion Alliance, Inc. in Indianapolis, Indiana.

In addition to love and enjoyment of his beautiful wife and two daughters (and dog and cat), and great times playing drums at an awesome local church, Jamie continually seeks opportunities to share his passion for helping software teams build and deliver real value to their customers.

Brian Wortman has been developing software for more than 20 years across a wide range of industries, including pharmaceutical, healthcare, telecommunications, surveillance, military, and financial. He received an M.S. in Computer Science from Johns Hopkins University in 1998. He is currently working as a senior consultant at Fusion Alliance, Inc. in Indianapolis, Indiana.

In this Book

  • ASP.NET as a Service Framework
  • What is RESTful?
  • Designing the Sample REST API
  • Building the Environment and Creating the Source Tree
  • Up and Down the Stack with a POST
  • Securing the Service
  • Dealing with Relationships, Partial Updates, and Other Complexities
  • Supporting Diverse Clients
  • Completing the Picture