1
0
mirror of synced 2024-11-05 02:59:16 +00:00
Tapeti/Tapeti.DataAnnotations/ConfigExtensions.cs

21 lines
566 B
C#
Raw Normal View History

using Tapeti.Config;
namespace Tapeti.DataAnnotations
2017-02-12 20:43:30 +00:00
{
/// <summary>
/// Extends ITapetiConfigBuilder to enable DataAnnotations.
/// </summary>
2017-02-12 20:43:30 +00: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 20:43:30 +00:00
{
config.Use(new DataAnnotationsExtension());
2017-02-12 20:43:30 +00:00
return config;
}
}
}