Programing Web API using ASP.NET Core 6

Last modified: 2022-03-01

Audience

Developers

Duration

2 Days

Description

ASP.NET Core can create REST services, also called Web API services. You can build this communication infrastructure for information exchange between systems. Web API are the building blocks to create various architectures, like SOA, micro-services and nano-services. Data is transfered using the JSON format

This training uses the latest .NET version. (Currently version 6).

Course Outline


Introduction to REST

  • REST fundamentals
  • Standards and conventions
  • Architectures (SOA, Micro-services, etc)
  • Data Formats: JSON vs. XML

First apps with Web API

  • Create a Web API
  • Minimal APIs
  • Using dependency injection
  • Configure middleware
  • Routing
  • Attributs
  • Scaffolding controlers

Getting data

  • Test with Swagger/OpenAPI documentation
  • Test with different tools
    • Curl
    • Http-repl
    • Postman
  • Use .NET with HttpClient
  • Use JavaScript with fetch

Databases with Web API

  • Entity Framework
  • OData
  • Validation

Securing Web API

  • Authentication
  • Authorization
  • Logging
  • CORS
  • Prevent over-posting

Advanced ASP.NET

  • Filters
  • Formatters, model binding
  • Custom Middleware
    • Adding a Custom Response Header
    • Checking for an API Key
  • JSON Patch