Similar to ASP.NET Core 2.1's AddMvc()
, Unravel provides an AddAspNetWebApi()
extension method on IServiceCollection
that registers a System.Web.Http.Dependencies.IDependencyResolver
.
The resulting IAspNetWebApiBuilder
is similar to IMvcBuilder
, providing an extension point for additional configuration:
public override void ConfigureServices(IServiceCollection services)
{
services.AddAspNetWebApi()
.AddControllersAsServices();
}