Minimal-API-.Net6
Table of content, projects with detailed examples
- Fundamentals. Lambdas. Flat Structure file
- Architecturing MinimalAPI. Reflection & Class registration
- CORS for MinimalAPI
- IOptions, Configuration, IOptionMonitor, IOptionSnapshot, IOptionFactory
- Exception Handling following IETF Standard and custom handling
- Logging
- DTO Fluent Validation. Enrich Swagger with Validation Rules Description
- Automapper
- Dapper & Automapper
- Authentication using JWT
- Authorization using different methods
- Localization & Globalization using resx. DateTime Converter
- Benchmakring ControllerAPI & MinimalAPI
Minimal API .Net6. General Information
Examples:
CORS
Examples:
Run FrontendSPA to test CORS
In order to test CORS you may run Index.html file hosted under Course03 project in Frontend-for-CORS folder using LiveReloadServer
To Install LiveReloadServer for .Net6 and .Net7:
- cmd -> dotnet install -g --version 1.1.0 LiveReloadServer
- cmd -> dontnet install -g LiveReloadServer
To host Index.Html file in server's memory:
- cmd -> livereloadserver {BasePath}\Chapter03-CORS-GlobalAPISettings\Folder-For-Frontend
IOptions vs IOptionMonitor vs IOptionSnapshot
Examples:
Error handling using IETF Standard
Examples:
Configuring Logging in .Net6 MinimalAPI
Examples:
Fluent Validation
Examples:
Benchmarking using K6
http_req: 20078 - means a number of requests handled per second and total number of them