1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Tapeti.DataAnnotations/ConfigExtensions.cs
Mark van Renswoude 6c32665c8a [ci skip] Refactored how consume result is handled
Reimplemented the exception strategy and logging
Much XML documentation, such wow
2019-08-14 12:20:53 +02:00

21 lines
566 B
C#

using Tapeti.Config;
namespace Tapeti.DataAnnotations
{
/// <summary>
/// Extends ITapetiConfigBuilder to enable DataAnnotations.
/// </summary>
public static class ConfigExtensions
{
/// <summary>
/// Enables the DataAnnotations validation middleware.
/// </summary>
/// <param name="config"></param>
public static ITapetiConfigBuilder WithDataAnnotations(this ITapetiConfigBuilder config)
{
config.Use(new DataAnnotationsExtension());
return config;
}
}
}