ControllerBase.Created 方法

定义

重载

Created()

创建一个 CreatedResult 生成响应的对象 Status201Created

Created(String, Object)

创建一个 CreatedResult 生成响应的对象 Status201Created

Created(Uri, Object)

创建一个 CreatedResult 生成响应的对象 Status201Created

Created()

Source:
ControllerBase.cs

创建一个 CreatedResult 生成响应的对象 Status201Created

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Created : unit -> Microsoft.AspNetCore.Mvc.CreatedResult
override this.Created : unit -> Microsoft.AspNetCore.Mvc.CreatedResult
Public Overridable Function Created () As CreatedResult

返回

为响应创建的 CreatedResult

属性

适用于

Created(String, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

创建一个 CreatedResult 生成响应的对象 Status201Created

public:
 virtual Microsoft::AspNetCore::Mvc::CreatedResult ^ Created(System::String ^ uri, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (string uri, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (string uri, object? value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (string? uri, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Created : string * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
override this.Created : string * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
Public Overridable Function Created (uri As String, value As Object) As CreatedResult

参数

uri
String

创建内容的 URI。

value
Object

要在实体正文中设置格式的内容值。

返回

为响应创建的 CreatedResult

属性

适用于

Created(Uri, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

创建一个 CreatedResult 生成响应的对象 Status201Created

public:
 virtual Microsoft::AspNetCore::Mvc::CreatedResult ^ Created(Uri ^ uri, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (Uri uri, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (Uri uri, object? value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (Uri? uri, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Created : Uri * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
override this.Created : Uri * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
Public Overridable Function Created (uri As Uri, value As Object) As CreatedResult

参数

uri
Uri

创建内容的 URI。

value
Object

要在实体正文中设置格式的内容值。

返回

为响应创建的 CreatedResult

属性

适用于