Some time ago, I needed to implement a mechanism for an API to update an entity without using JsonPatchDocument. The reason was that the user of the API didn’t want to necessarily use JSON to use the patch method. But user might want to use XML, Message Pack or any other format. What I needed …
API
Asp.Net Core 2 Logging With Serilog And Microsoft SQL Server Sink
In this post, I’m going to describe how we can configure Serilog with Asp.Net Core 2 web and Api projects. I also configure Serilog to work with SQL Server database to store the logging information. Then I’ll write an extension method and use the built-in exception handling middleware to log exceptions in production environments. What …