MvcOptions.SuppressAsyncSuffixInActionNames Property

Definition

Gets or sets a value that determines if MVC will remove the suffix "Async" applied to controller action names.

ActionName is used to construct the route to the action as well as in view lookup. When true, MVC will trim the suffix "Async" applied to action method names. For example, the action name for ProductsController.ListProductsAsync will be canonicalized as ListProducts.. Consequently, it will be routeable at /Products/ListProducts with views looked up at /Views/Products/ListProducts.cshtml.

This option does not affect values specified using using ActionNameAttribute.

public:
 property bool SuppressAsyncSuffixInActionNames { bool get(); void set(bool value); };
public bool SuppressAsyncSuffixInActionNames { get; set; }
member this.SuppressAsyncSuffixInActionNames : bool with get, set
Public Property SuppressAsyncSuffixInActionNames As Boolean

Property Value

The default value is true.

Applies to