-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Crud is a library that complements the Turner Mediator by providing default, configurable request handlers for commonly-used (CRUD) requests.
Crud has the following dependencies:
The following supplemental packages are also available:
- Turner.Infrastructure.Crud.EntityFrameworkCore
- Turner.Infrastructure.Crud.FluentValidation
- Turner.Infrastructure.Crud.All
- Install the
Turner.Infrastructure.Crud.All
nuget package - Create a Crud initializer with the project's
SimpleInjector
container and any assemblies containing Crud requests, validators, or other Crud artifacts. At very least, an interface to the data context must be configured.
Crud.CreateInitializer(container, assemblies)
.UseCommonInitialization()
.Initialize();
UseCommonInitializer()
will configure an interface to an Entity Framework Core data context.
Adds the UseEntityFramework()
configuration method to Crud initializers.
This method will configure an interface to an Entity Framework Core data context.
Adds the UseFluentValidation()
configuration method to Crud initializers.
This method will attach a default validator (IRequestValidator
) implementation to all Crud request handlers which will attempt to run a FluentValidation
IValidator
on request objects.
These validators will respect the Crud initialization's ValidateAllRequests()
setting.
See the validation page for more information on request validation.
Adds the UseCommonInitialization()
configuration method to Crud initializers.
This method is equivalent to calling UseEntityFramework()
and UseFluentValidation()
from the above packages.