Overview of the Microsoft.Restier.Core.Submit namespace
mainThe Microsoft.Restier.Core.Submit namespace provides the core abstractions and implementations for handling data submission flows in Restier. It manages how multiple data modifications are grouped into change sets, validated, authorized, and executed.
Core Concepts
Change Sets
ChangeSet: Represents a collection of changes to be applied.ChangeSetItem: Represents an individual item within aChangeSet.DataModificationItem: Represents the specific data modification logic for an item in a change set.SubmitContext: Provides the context under which a submission flow operates.SubmitResult: Encapsulates the outcome of a submission attempt.
Submission Lifecycle and Extensibility
Restier uses several interfaces to allow developers to hook into the submission process:
- Initialization: Use
IChangeSetInitializer(or theDefaultChangeSetInitializerclass) to initialize a change set. - Authorization: Use
IChangeSetItemAuthorizerto implement logic that determines if a user is authorized to perform a specific change set item operation. - Filtering: Use
IChangeSetItemFilterto inject logic that runs before and after a change set item is processed. - Validation: Use
IChangeSetItemValidatorto validate change set entries. Results of these validations are returned asChangeSetItemValidationResultobjects. - Execution: Use
ISubmitExecutor(or theDefaultSubmitExecutorclass) to execute the actual submission process.