Interface IFormBuilderModelManager
Defines a contract to perform model binding for form components.
public interface IFormBuilderModelManager
- Extension Methods
Methods
BindModelAsync(IFormComponentBinder, FormBuilderBindingContext)
Binds form components according to data source used by formComponentBinder
.
Moreover components are validated and the model state is filled with any errors that occurred during validation.
Task<List<FormComponent>> BindModelAsync(IFormComponentBinder formComponentBinder, FormBuilderBindingContext bindingContext)
Parameters
formComponentBinder
IFormComponentBinderResponsible for binding form components. Default binder that binds from form collection can be created by CreateFormComponentBinder(Controller) method.
bindingContext
FormBuilderBindingContextContext containing necessary data for binding.
Returns
- Task<List<FormComponent>>
Exceptions
- ArgumentNullException
Thrown when
formComponentBinder
orbindingContext
is null.