Share via


MutableObjectModelBinder.EnsureModel Method

Creates a model instance if an instance does not yet exist in the binding context.

Namespace:  System.Web.Http.ModelBinding.Binders
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Protected Overridable Sub EnsureModel ( _
    actionContext As HttpActionContext, _
    bindingContext As ModelBindingContext _
)
'Usage
Dim actionContext As HttpActionContext
Dim bindingContext As ModelBindingContext

Me.EnsureModel(actionContext, bindingContext)
protected virtual void EnsureModel(
    HttpActionContext actionContext,
    ModelBindingContext bindingContext
)
protected:
virtual void EnsureModel(
    HttpActionContext^ actionContext, 
    ModelBindingContext^ bindingContext
)
abstract EnsureModel : 
        actionContext:HttpActionContext * 
        bindingContext:ModelBindingContext -> unit 
override EnsureModel : 
        actionContext:HttpActionContext * 
        bindingContext:ModelBindingContext -> unit 
protected function EnsureModel(
    actionContext : HttpActionContext, 
    bindingContext : ModelBindingContext
)

Parameters

See Also

Reference

MutableObjectModelBinder Class

System.Web.Http.ModelBinding.Binders Namespace