dotnet-module/README.md

22 lines
381 B
Markdown
Raw Permalink Normal View History

2021-08-11 15:27:39 -04:00
# Reasoning
Just makes it easier to organize modules with a class instead of a static extension method.
```csharp
services
.AddModule<SomeModule>()
.AddModule<SomeOtherModule>();
```
```csharp
public class MyModule : IModule
{
public IServiceCollection ConfigureServices(IServiceCollection services)
{
2021-08-11 16:35:33 -04:00
services.AddModule<CoolOtherModule>();
2021-08-11 15:27:39 -04:00
return services;
}
}
2021-08-11 16:35:33 -04:00
```