Course Catalog
Curriculum Guides
  .NET
  Java/J2EE
  XML
Downloads
Buy Courseware
Customization
News
Authors
Technical Library
FAQ
About Object Innovations
Opportunities
Contact Us
Home

 

 

   
www.objectinnovations.com
info@objectinnovations.com
877-558-7246 (toll free)  
781-466-8012  

4147. ASP.NET Web API Essentials Using C#

Rev. 4.7

 

This course provides a practical hands-on introduction to developing and consuming ASP.NET Web API services using C# and Visual Studio 2015. This Web development framework from Microsoft makes it easy to create HTTP services that can reach a broad range of clients. It is an excellent platform for creating RESTful Web applications. The course is current to .NET Framework 4.5.2/4.6 and ASP.NET Web API 2.

 

Numerous programming examples and exercises are provided. The student will receive a comprehensive set of notes and all the programming examples.

 

LEARNING OBJECTIVES

 

         Gain an understanding of what ASP.NET Web API is and why it is useful

         Implement HTTP services using Web API and Visual Studio 2015

         Consume HTTP services using both jQuery and the ASP.NET Web API client library

         Handle different media formats and content variations in Web API services

         Understand routing and binding in Web API

         Perform validation of request data

 

Duration: 2 days

 

Prerequisites: The student should have a good working knowledge of C# and the .NET Framework. Basic knowledge of ASP.NET, HTML and JavaScript is also required.

 

1.      Introduction to ASP.NET Web API

ASP.NET Web API

Representational State Transfer

REST and Web API

HTTP Services Using Web API

Using Fiddler

Web API vs. WCF

 

2.      Web API and HTTP

HTTP Response Codes

HttpResponseException

Implementing POST

Implementing PUT

Implementing DELETE

 

3.      Media Formatters and Content Negotiation

Internet Media Types

Media Formatters

JSON and XML Formatters

Content Negotiation

Accept and Content-Type Headers

Using the Query String

Custom Request Headers

Serialization

BSON Serialization

 

4.      JavaScript Clients

Document Object Model

jQuery

Sending AJAX Requests

Implementing a Client

 

5.      Binding, Validation and Routing

Reading Raw HTTP Requests

Route Data, Query String and Request Body

Binding to Simple Types

Binding to Complex Types

Validation Using Data Annotations

Routing in ASP.NET Web API

Using Default Routes

 

6.      .NET Clients

Web API Client Libraries

HttpClient

Issuing GET Requests

Issuing POST Requests

Other Requests

 

Appendix A. Learning Resources

 

 

System Requirements

 

Required software is Visual Studio 2015, including the free Visual Studio Community 2015. The preferred operating system is Windows 7. The free Fiddler HTTP tool is also used. This can be downloaded from the Web. See the course Setup Notes for details.

 

A good minimal hardware profile for this course would have a 1.8 GHz or equivalent CPU, 2 GB of RAM, and at least 10 GB of free disk space for tools installation and courseware.