Call Us: +32 2 466 00 16
Email: info@u2u.be
Follow Us:

Building REST Services with ASP.NET Web API

2days
Webinar code
uwwapi

Upcoming sessions

16 Apr 2020
Book this webinar

REST

Roy Fielding, the inventor of REST, realized while using the HTTP protocol you can also use HTTP to work with data stored in a database. Here we will look at how REST uses HTTP to serve data instead of web pages.

  • The HTTP Protocol in Depth
  • How REST works

Introducing ASP.NET Web API

For .NET developers ASP.NET Web Api is the way to create REST services. Web API is an adapted version of ASP.NET MVC specifically designed for REST. This module serves as an overview of the framework.

  • Architecture
  • CRUD operations
  • Content Negotiation
  • Consuming with a .NET Client or fetch API

ASP.NET Web API Routing

A URL and an HTTP verb create a request. Having full control over what happens in our Web Service is essential for any Web API developer.

  • Convention-based routing
  • Routing Attributes
  • Routing Errors
  • Cross-Origin Resource Sharing

ASP.NET Web API Controllers

In this module we'll take a closer look at the C in MVC. The controller has a very important role to fulfill: It's the component that figures out what to do when receiving a request.

  • The ApiController Attribute and ControllerBase Class
  • Action Methods
  • Understanding IActionResult
  • Using the ProblemDetails class for error reporting

Model Validation

  • Model Binding
  • The Modelstate
  • Validation Attributes
  • Returning Validation Errors

Securing your Web API service

Security is a world on its own. In this module we'll explore the common techniques to secure your Web API.

  • Authentication & Authorization in Web API
  • Authorization Attributes and Policies
  • Authentication with OAuth and OpenID Connect
  • Working with Roles and Scopes

Documenting your REST service with the OpenAPI Specification

When you want to consume a REST service you are dependent on the documentation of the service. And developers don't like to write documentation. No problem: using Swagger you can automatically generate the necessary metadata for describing your service functionalities.

  • Swagger and Swashbuckle
  • Enriching your metadata with attributes
  • Enriching your metadata with comments
  • Adding XML-comments
  • Generating client-side code with Visual Studio and Swagger Codegen

Best Practices when Designing a Web API

Returning a 202 Accepted status code is easy. When to return it, that's another question. In this topic we'll dive into some best practices to create a properly designed API.

  • How to Organize Resources
  • Idempotency and Safeness
  • Dealing with Batches
  • Remote Procedure Calls
  • Limiting Data
  • Versioning
  • Handling Exceptions
  • Caching
  • Handling Large Resources

Web API Patterns

This topic contains some frequently used patterns and techniques when creating more complex APIs.

  • Asynchronous Request-Reply Pattern
  • WebHooks
  • HATEOAS

Getting your data from one side to the other. It's a persistent problem for developers. By using HTTP as the application protocol; REST is a reliable, performant and easy approach for building Web Services. ASP.NET Web API is Microsoft's answer to the growing demand, and is built up from the ground to alleviate REST development in both .NET Framework and Core.

Participants of this course need to have a solid understanding of the .NET platform and have built .NET applications using either C# or VB.NET. Knowledge about ASP.NET MVC (.NET Framework or .NET Core) or ASP.NET in general is a plus.

© 2020 U2U All rights reserved.