ControllerBase.CreatedAtRoute 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
CreatedAtRoute(String, Object, Object)
建立產生 CreatedAtRouteResultStatus201Created 回應的 物件。
public:
virtual Microsoft::AspNetCore::Mvc::CreatedAtRouteResult ^ CreatedAtRoute(System::String ^ routeName, System::Object ^ routeValues, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (string routeName, object routeValues, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (string? routeName, object? routeValues, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member CreatedAtRoute : string * obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
override this.CreatedAtRoute : string * obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
Public Overridable Function CreatedAtRoute (routeName As String, routeValues As Object, value As Object) As CreatedAtRouteResult
參數
- routeName
- String
用來產生 URL 的路由名稱。
- routeValues
- Object
用來產生 URL 的路由資料。
- value
- Object
在實體主體中格式化的內容值。
傳回
為回應建立 CreatedAtRouteResult 的 。
- 屬性
適用於
CreatedAtRoute(String, Object)
建立產生 CreatedAtRouteResultStatus201Created 回應的 物件。
public:
virtual Microsoft::AspNetCore::Mvc::CreatedAtRouteResult ^ CreatedAtRoute(System::String ^ routeName, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (string routeName, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (string? routeName, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member CreatedAtRoute : string * obj -> Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
override this.CreatedAtRoute : string * obj -> Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
Public Overridable Function CreatedAtRoute (routeName As String, value As Object) As CreatedAtRouteResult
參數
- routeName
- String
用來產生 URL 的路由名稱。
- value
- Object
在實體主體中格式化的內容值。
傳回
為回應建立 CreatedAtRouteResult 的 。
- 屬性
適用於
CreatedAtRoute(Object, Object)
建立產生 CreatedAtRouteResultStatus201Created 回應的 物件。
public:
virtual Microsoft::AspNetCore::Mvc::CreatedAtRouteResult ^ CreatedAtRoute(System::Object ^ routeValues, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (object routeValues, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (object? routeValues, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member CreatedAtRoute : obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
override this.CreatedAtRoute : obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
Public Overridable Function CreatedAtRoute (routeValues As Object, value As Object) As CreatedAtRouteResult
參數
- routeValues
- Object
用來產生 URL 的路由資料。
- value
- Object
在實體主體中格式化的內容值。
傳回
為回應建立 CreatedAtRouteResult 的 。
- 屬性