Multiple Swagger definitions in the same .NET project

Multiple service references added to the same project

A Swagger file is a json file containing API definition which allows you to consume an API without manually writing your own request/response classes or HttpClient code. Instead, you are getting an automatically generated typed client and corresponding classes.

Since Swagger file is an implementation of the OpenAPI standard, people can refer to it as OpenAPI file, definition or specification.

>>> Continue reading <<<

Nullable reference types and model binding in ASP.NET

Nullable reference type project setting in .NET

Nullable reference types - a comparatively new feature of C# which helps (to some extent) to deal with probably the most common bug - NullReferenceException . The feature was introduced in C# 8.0, and the main idea behind it is a new compiler analyzer which produces warnings if you try to access (or a better word - dereference) potentially nullable reference type.

For old projects you can enable this feature by adding <Nullable>enable</Nullable> line to .csproj file. For new ASP.NET projects this feature is enabled by default, but you can disable it by removing the corresponding line from .csproj.

>>> Continue reading <<<