From 73f557002f89fb0ff6da4ad7a74d2bcfe78b688a Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Wed, 11 Nov 2015 15:12:17 -0800 Subject: [PATCH] Add `AddDataAnnotationsLocalization` parameterless overload. - The `IMvcBuilder` extension methods already had this overload, just adding it to `IMvcCoreBuilder`. #3517 --- .../MvcDataAnnotationsMvcCoreBuilderExtensions.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs index cf2e5a0b68..2e668806e5 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs @@ -31,6 +31,21 @@ namespace Microsoft.Extensions.DependencyInjection return builder; } + /// + /// Adds MVC data annotations localization to the application. + /// + /// The . + /// The . + public static IMvcCoreBuilder AddDataAnnotationsLocalization(this IMvcCoreBuilder builder) + { + if (builder == null) + { + throw new ArgumentNullException(nameof(builder)); + } + + return AddDataAnnotationsLocalization(builder, setupAction: null); + } + /// /// Registers an action to configure for MVC data /// annotations localization.