DefaultModelBinder.CreateModel メソッド

定義

指定されたコントローラー コンテキストおよびバインディング コンテキストを使用して、指定されたモデル型を作成します。

protected virtual object CreateModel (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, Type modelType);
abstract member CreateModel : System.Web.Mvc.ControllerContext * System.Web.Mvc.ModelBindingContext * Type -> obj
override this.CreateModel : System.Web.Mvc.ControllerContext * System.Web.Mvc.ModelBindingContext * Type -> obj
Protected Overridable Function CreateModel (controllerContext As ControllerContext, bindingContext As ModelBindingContext, modelType As Type) As Object

パラメーター

controllerContext
ControllerContext

コントローラーが機能するコンテキスト。 このコンテキスト情報には、コントローラー、HTTP コンテンツ、要求コンテキスト、ルート データなどが含まれます。

bindingContext
ModelBindingContext

モデルをバインドするコンテキスト。 このコンテキストには、モデル オブジェクト、モデル名、モデルの型、プロパティ フィルター、値プロバイダーなどの情報が含まれます。

modelType
Type

返すモデル オブジェクトの型。

戻り値

指定した型のデータ オブジェクト。

適用対象