Who is this training for?
• Developers
Training objectives
At the end of this training, participants will be able to: Understand the principles of REST Web Services and associated architectures (SOA, microservices). Design and develop API web services with ASP.NET Core. Set up routing, dependency injection and configuration of components (middleware). Manipulate data and interact with databases through tools like Entity Framework. Test and document APIs using specialized tools (e.g., Swagger, Postman). Secure web services (authentication, authorization, access management)
Summary
ASP.NET Core allows you to create REST services, also known as Web API services. This creates infrastructure for our various systems to share information. Web APIs are the building blocks on which SOA, micro-services and nano-services architectures can be built. The data is transferred in a JSON format. This course uses the latest version of .NET (Version 6 at the time of writing).
Course outline
Introduction to REST
- REST Basics
- Standards and Uniformity
- Architectures (SOA, Micro-services, etc)
- Data Formats: JSON versus XML Getting Started with Web API
- Creating a Web API Service
- Minimal Hosting Model
- Preparing Dependency Injection
- Configuring Middleware
- Routing • Attributes
- Generating Services (Scaffolding) Connecting Data with a Client
- Testing with Swagger or OpenAPI Documentation
- Testing with Different Tools
- Curl • Http-repl • Postman
- Use .NET with HttpClient
- Use JavaScript with fetch Databases with Web API
- Entity Framework
- OData
- Validate Secure Web API
- Identify
- Allow
- Log
- CORS
- Prevent over-posting Advanced ASP.NET Features
- Filters • Formatters, model binding
- Custom Middleware
- Adding a Custom Response Header
- Checking for an API Key
- JSON Patch
Approach and methodology
Structured lectures to understand the concepts of Web Services APIs and REST architectures. Demonstrations of ASP.NET Core features to illustrate the concepts covered. Guided hands-on exercises for developing and testing APIs. Use of professional tools (Swagger, Postman, HttpClient) to experiment and validate services. Scenarios to design and secure services in realistic contexts. Exchanges with the trainer to deepen the concepts and respond to the problems encountered.
Prerequisites
Knowledge of the C# language and object-oriented programming concepts. Basic experience in .NET or web application development. Knowledge of HTTP protocols and web concepts (asset). Familiarity with development environments (e.g. Visual Studio).
Recommendations
Review the basics of .NET development and the C# language before training. Familiarize yourself with REST concepts and data exchanges (JSON, HTTP). Actively participate in practical exercises to promote understanding. Putting the learnings into practice in concrete or personal projects. Consider this training as a basis for moving towards advanced architectures (microservices, cloud).
