Skip to content
Documentation

ICustomModelBinder Interface

Extends Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder with the ability to determine whether a specific model type and binding source can be handled.

public interface ICustomModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder

Derived
↳ CustomModelFromBodyBinder<TModel>
↳ CustomModelFromQueryBinder<TModel>
↳ CustomModelFromRouteBinder<TModel>
↳ ICustomModelFromQueryBinder
↳ StructModelBinder<TModel>

Implements Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder

ICustomModelBinder.CanBind(Type, BindingSource) Method

Section titled “ICustomModelBinder.CanBind(Type, BindingSource) Method”

Determines whether this binder can bind the specified modelType from the given bindingSource.

bool CanBind(System.Type modelType, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? bindingSource);

modelType System.Type

The System.Type of the model to bind.

bindingSource Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource

The Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource indicating where the data originates, or null.

System.Boolean
true if this binder supports the specified model type and binding source; otherwise, false.

© 2026 Volue.Version v0.6.38017 November 2026