Binds a complex model and initializes the properties configured within the application context. Then sets the partition key property of the IDataModel.
When an IDataProperty has protection set, this binder protects the data using:
If protection is Encripted
the Cryptographer.EncryptToBase64String
method is used.
If protection is Hash
or Password
the Cryptographer.ComputeHash
is used and
the result is then converted to a Base64 string.
Initializes a new instance of MultitenantDataModelModelBinder.
public Void MultitenantDataModelModelBinder(propertyBinders, loggerFactory)
Name | Type | Summary |
---|---|---|
propertyBinders | Dictionary<ModelMetadata, IModelBinder> | The IDictionary`2 of binders to use for binding properties. |
loggerFactory | ILoggerFactory | A ILoggerFactory. |
Creates the object model from the application context and sets the partition key property if the model has one.
protected Object CreateModel(bindingContext)
An Object compatible with ModelType.
Name | Type | Summary |
---|---|---|
bindingContext | ModelBindingContext | The ModelBindingContext. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when bindingContext is null. |
MissingPartitionKeyException | Thrown when the HttpContext does not has tenant data. |
In this document