Skip to content

Commit f5fdc0a

Browse files
committed
Add constraint to ModelBinderAttribute
1 parent 5902afc commit f5fdc0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mvc/Mvc.Core/src/ModelBinderOfTAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc;
1111
/// This is a derived generic variant of the <see cref="ModelBinderAttribute"/>.
1212
/// Ensure that only one instance of either attribute is provided on the target.
1313
/// </remarks>
14-
public class ModelBinderAttribute<TBinder> : ModelBinderAttribute
14+
public class ModelBinderAttribute<TBinder> : ModelBinderAttribute where TBinder : IModelBinder
1515
{
1616
/// <summary>
1717
/// Initializes a new instance of <see cref="ModelBinderAttribute"/>.

0 commit comments

Comments
 (0)