diff --git a/src/Presentation/Nop.Web.Framework/Mvc/IModelAttribute.cs b/src/Presentation/Nop.Web.Framework/Mvc/IModelAttribute.cs
index 5986fc5fe6d..d795592c205 100644
--- a/src/Presentation/Nop.Web.Framework/Mvc/IModelAttribute.cs
+++ b/src/Presentation/Nop.Web.Framework/Mvc/IModelAttribute.cs
@@ -1,7 +1,14 @@
-namespace Nop.Web.Framework.Mvc
+
+namespace Nop.Web.Framework.Mvc
{
+ ///
+ /// Represents custom model attribute
+ ///
public interface IModelAttribute
{
+ ///
+ /// Gets name of the attribute
+ ///
string Name { get; }
}
}
diff --git a/src/Presentation/Nop.Web.Framework/Mvc/NopMetadataProvider.cs b/src/Presentation/Nop.Web.Framework/Mvc/NopMetadataProvider.cs
index 72b1ffe6fd6..35762df4aa7 100644
--- a/src/Presentation/Nop.Web.Framework/Mvc/NopMetadataProvider.cs
+++ b/src/Presentation/Nop.Web.Framework/Mvc/NopMetadataProvider.cs
@@ -1,32 +1,31 @@
-#if NET451
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web.Mvc;
+using System.Linq;
+using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
using Nop.Core;
namespace Nop.Web.Framework.Mvc
{
///
- /// This MetadataProvider adds some functionality on top of the default DataAnnotationsModelMetadataProvider.
- /// It adds custom attributes (implementing IModelAttribute) to the AdditionalValues property of the model's metadata
- /// so that it can be retrieved later.
+ /// Represents metadata provider that adds custom attributes to the model's metadata, so it can be retrieved later
///
- public class NopMetadataProvider : DataAnnotationsModelMetadataProvider
+ public class NopMetadataProvider : IDisplayMetadataProvider
{
- protected override ModelMetadata CreateMetadata(IEnumerable attributes, Type containerType, Func