nuget.org : component.as.service
Add Component.As.Service to your AspNetCore app in the usual way and behold as your application component is exposed to the world at `http://localhost:5000/MyApplicationComponent/MethodName?parameterA=a¶meterB=B` ``` public class Startup { public void ConfigureServices(IServiceCollection services) { services /* .AddMvc() here if you required MvcOptions */ .AddComponentAsService(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app /* .UseMvc() here if you require custom Mvc configuration */ .UseComponentAsService<MyApplicationComponent>(); } } ``` ### Q&A * And form post and json post and complex objects? Yes. Anything that Mvc can normally deliver to an Action by the magic of ModelBinding will be delivered to your component method. * What about Route Constraints and REST and things? For sophisticated HTTP-specific concerns, write a traditional MVC Controller which takes your Component as a dependency. * Really? Yes really. This is very much a 'Keep it Simple' offer.
Registry
-
Source
- JSON
purl: pkg:nuget/component.as.service
Keywords:
aspnetcore
, aspnetcoremvc
, debugging
, routing
, logging
License:
Latest release: over 6 years ago
First release: over 6 years ago
Downloads: 1,107 total
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 4 days ago