'Full ASP.NET Core Web Api vs. Class Library as UI layer dependency

What would be the pros & cons of using a full ASP.NET Core Web Api as a UI layer dependency vs. a simple Class Library containing a Controller with all the required Action Methods as a UI layer dependency?

What is the common practice here?


Full ASP.NET Core Web Api as main project dependency:

Full ASP.NET Core Web Api as main project dependency


Class Library as project dependency:

Class Library as project dependency



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source