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)
Dependencies
- Microsoft.AspNetCore.Mvc(>= 2.1.3)
Tags
```
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.