Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.52 KB

File metadata and controls

44 lines (35 loc) · 1.52 KB

Waystone.Common.Application

The foundational code required to create .NET 6 Clean Architecture Application layer projects for Draekien Industries. It is intended to be used alongside:

Recommended Usage

The below sample code is the recommended usage for this library. If you wish to not use some features provided by the library, then see the Advanced Usage section and do not use AcceptDefaults().

// *.Application.DependencyInjection.cs
using Waystone.Application.DependencyInjection;

// Accept the default configuration inside an IServiceCollection extension method
// Currently configures:
// - automapper
// - mediatr
// - fluent validation
services.AddWaystoneApplicationBuilder(typeof(DependencyInjection))
        .AcceptDefaults();

Advanced Usage

// *.Application.DependencyInjection.cs
using Waystone.Application.DependencyInjection;

// inside an IServiceCollection extension method
services.AddWaystoneApplicationBuilder(typeof(DependencyInjection))
        .AddAutoMapper()
        .AddMediatR()
        .AddFluentValidation()
        .ConfigurePipelineBehaviours(options => {
            options.UseValidationPipelineBehaviour = true;
            options.UseCachingPipelineBehaviour = true;
        });