sponsor

ErrLog.IO is a free error logging and tracking service providing .Net, .Net Core and JavaScript libraries. We’ve recently released our .Net Core 2.0 library, designed to simplify how you catch errors and exceptions in your applications.

.net

This was my primary language, every time I compared it to other popular languages I was happy I accidentally chose it. Python and Javascript lack static typing (assuming JS has any kind of typing), Java lacks proper generics, properties, events, value types, which brings up a mess of all those wrapper classes like Integer and so on.

This library was inspired by Jonathan Müller's type_safe library, and the general advice to avoid primitive obsession. It contains structs meant to add type safety for fields that are represented by built-in types, like int, float values, and strings, by adding a Tag field to separate the types.

This is not a new subject and the support for handling WebApi input and output was introduced in .NET Core 2.0 and it's been there since then. There are couple of useful pages out there and it is even well documented on Microsoft official page Custom formatters in ASP.NET Core Web API. Although it is well documented I did have some small issues when implementing it on alive project, so I will try to explain how to use this feature in ASP.NET Core WebAPI to serve different content format depending on the headers passed in the request to the API controller method.

In this writeup, we operationalized the building, packaging and deployment of an ML.NET application that predicts the class of an Iris flower using a variety of mesurements with Azure DevOps. We created both a Continous Integration as well as a Continous Delivery pipeline which deploys the Docker image of an ASP.NET Core Web API to Azure Container Instances. Keep in mind this is just one way of doing it and Azure DevOps is flexible in how all of these tasks and workflows are configured to meet your requirements. Happy coding!