1
0
mirror of synced 2024-11-24 11:43:12 +01:00
Tapeti/Tapeti.DataAnnotations/ConfigExtensions.cs

21 lines
566 B
C#
Raw Normal View History

using Tapeti.Config;
namespace Tapeti.DataAnnotations
2017-02-12 21:43:30 +01:00
{
/// <summary>
/// Extends ITapetiConfigBuilder to enable DataAnnotations.
/// </summary>
2017-02-12 21:43:30 +01:00
public static class ConfigExtensions
{
/// <summary>
/// Enables the DataAnnotations validation middleware.
/// </summary>
/// <param name="config"></param>
public static ITapetiConfigBuilder WithDataAnnotations(this ITapetiConfigBuilder config)
2017-02-12 21:43:30 +01:00
{
config.Use(new DataAnnotationsExtension());
2017-02-12 21:43:30 +01:00
return config;
}
}
}