Class FromRequestModelBinder
- Namespace
- Cratis.Applications.ModelBinding
- Assembly
- Cratis.Applications.dll
Represents a IModelBinder for FromRequestBindingSource.
public class FromRequestModelBinder : IModelBinder
- Inheritance
-
FromRequestModelBinder
- Implements
- Inherited Members
Remarks
Initializes a new instance of the FromRequestModelBinder class.
Constructors
FromRequestModelBinder(IModelBinder, IModelBinder)
Represents a IModelBinder for FromRequestBindingSource.
public FromRequestModelBinder(IModelBinder bodyModelBinder, IModelBinder complexModelBinder)
Parameters
bodyModelBinder
IModelBinderThe IModelBinder for resolving values from the HTTP body.
complexModelBinder
IModelBinderThe IModelBinder for resolving values from other parts of the HTTP request.
Remarks
Initializes a new instance of the FromRequestModelBinder class.
Methods
BindModelAsync(ModelBindingContext)
Attempts to bind a model.
public Task BindModelAsync(ModelBindingContext bindingContext)
Parameters
bindingContext
ModelBindingContextThe ModelBindingContext.
Returns
- Task
A Task which will complete when the model binding process completes.
If model binding was successful, the Result should have IsModelSet set to
true
.A model binder that completes successfully should set Result to a value returned from Success(object).