Table of Contents

Class FromRequestModelBinder

Namespace
Cratis.Applications.ModelBinding
Assembly
Cratis.Applications.dll
public class FromRequestModelBinder : IModelBinder
Inheritance
FromRequestModelBinder
Implements
Inherited Members

Remarks

Initializes a new instance of the FromRequestModelBinder class.

Constructors

FromRequestModelBinder(IModelBinder, IModelBinder)

public FromRequestModelBinder(IModelBinder bodyModelBinder, IModelBinder complexModelBinder)

Parameters

bodyModelBinder IModelBinder

The IModelBinder for resolving values from the HTTP body.

complexModelBinder IModelBinder

The 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 ModelBindingContext

The 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).