Can ASP.NET Core WebAPI Actions have void return types?

ASP.NET Core WebAPI actions CAN have void return types. The framework returns an EmptyResult for such actions with a default 200 (OK) status Code.

This can be particularly observed in the cases of HttpDelete operations where no return is expected by the client in most cases.

How can you use .NET framework class libraries in a .NET Core application?

  • Class libraries which are built against .NET framework can be referenced and used inside a .NET Core application starting from .NET Core 2.x by means of a Compatibility Shim that was included in the .NET Core 2.x
  • .NET Framework and .NET Core are based on different BCL (base class libraries). The code can be reused, but if the class libraries make use of any .NET Framework BCL specific references (such as Object types - which are different in .NET Core), the application might throw runtime exceptions.

How to use Filters in ASP.NET Core

Filters are components built into the ASP.NET Core which can help us in controlling the execution of a request at specific stages of the request pipeline. These come into picture post the middleware execution, when the MVC middleware matches a Route and a specific Action is invoked.