Component.As.Service : Serves your Component. On the web. As a Service. NuGet Package

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&parameterB=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.




Got any Component.As.Service : Serves your Component. On the web. As a Service. Question?





Info

Version: 1.0.0
Author(s): Chris F Carroll
Last Update: Sunday, November 4, 2018
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/chrisfcarroll/ComponentAsService
NuGet Url: https://www.nuget.org/packages/Component.As.Service


Install
Install-Package Component.As.Service
dotnet add package Component.As.Service
paket add Component.As.Service
Component.As.Service Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

.3

avg-downloads-per-day

0

days-since-last-release

2209