CC63734: Fixing broken link (#7539)
Hello, @rick-anderson , This proposed file change comes from https://github.com/aspnet/Docs.zh-tw/pull/56. Could you review this contribution and help to merge if agreed? Many thanks in advance.pull/7542/head
parent
63866631d0
commit
97f31c8b47
|
@ -690,7 +690,7 @@ Conceptually, `IActionConstraint` is a form of *overloading*, but instead of ove
|
|||
|
||||
The simplest way to implement an `IActionConstraint` is to create a class derived from `System.Attribute` and place it on your actions and controllers. MVC will automatically discover any `IActionConstraint` that are applied as attributes. You can use the application model to apply constraints, and this is probably the most flexible approach as it allows you to metaprogram how they're applied.
|
||||
|
||||
In the following example a constraint chooses an action based on a *country code* from the route data. The [full sample on GitHub](https://github.com/aspnet/Entropy/blob/dev/samples/Mvc.ActionConstraintSample.Web/CountrySpecificAttribute.cs).
|
||||
In the following example a constraint chooses an action based on a *country code* from the route data. The [full sample on GitHub](https://github.com/aspnet/Entropy/blob/master/samples/Mvc.ActionConstraintSample.Web/CountrySpecificAttribute.cs).
|
||||
|
||||
```csharp
|
||||
public class CountrySpecificAttribute : Attribute, IActionConstraint
|
||||
|
|
Loading…
Reference in New Issue