Home About Courses Schedule Services Webinars Contact Search

Restful Services Using WebApi


Duration: 5.0 days

Method: Instructor led, Hands-on workshops

Price: $2950.00

Course Code: NE2210


Individuals wanting to gain a good understanding of developing web services using ASP.Net WebApi.


WebApi is becoming a very popular platform for developing stateless REST based services using the standard Http protocol. This is in contrast to developing services that use SOAP over Http e.g., WCF. Web API results in lightweight, scalable services and relies on programming against the Http verbs such as GET, POST, PUT and DELETE. Once created, the Web API can be consumed in a wide range of clients including web applications (especially MVC based applications), desktop applications and mobile applications. This course covers various aspects of creating and consuming ASP.NET Web API services including scalability, security issues, communicating with Javascript clients that use AJAX. Practical examples of developing WebApi services will be presented in the course.


Some background in web development and some knowledge of C# language.


  • I. REST and WebApi Fundamentals
    • Http protocol and different Http verbs
    • REST basics and RESTful services vs. SOAP based services
    • WebApi architecture
    • Understanding URL routing in WebApi
    • WebApi basics and its similarity to MVC
    • Concept of resources and Uniform Resource Locators
    • HTTP Status Codes
  • II. Creating Simple WebApi Services
    • Creating basic WebApi services that support CRUD operations
    • Wrting clients for the WebApi using HttpClient
    • Consuming WebApi via AJAX using JQuery
  • III. Asynchronous Programming in WebApi
    • Task-Based Asynchronous Pattern, Continuations, Errors, and Task Status Composition
    • Linked Cancellation Tokens
    • C# 5.0 Asynchronous Language Features
    • Exception Handling in Asynchronous code
    • Use of Asynchronous programming in WebApi clients
  • IV. Architecture of WebApi
    • Building the Domain Model
    • Brief Introduction to Entity Framework
    • Building Entity Objects and DbContext
    • Working with the Repository pattern
    • Creating the service layer
  • V. Message Handlers and Action Filters
    • Use of message handlers to process messages in a pipeline and use of ActionFilters to apply specific code to specified operations
  • VI. Content-Negotiation and Formatting
    • Content negotiation between the client and the service and the formatting of data
    • Handling binary data in WebApi.
  • VII. Security in ASP.Net WebApi
    • Basic security in WebApi services
    • Implementing Role based security in WebApi
  • VIII. Testing of WebApi Services
    • Creating Unit tests for Controllers
    • Testing of Sessions and Role Based security through Mock objects
    • Using fake classes in testing of session state
  • IX. Design of a complete WebApi application including an MVC client