C# Class Cofoundry.Web.ITransationScopeExtensions

Show file Open project: cofoundry-cms/cofoundry

Public Methods

Method Description
CompleteIfValidAsync ( ITransactionScope scope, ModelStateDictionary modelState ) : Task

Completes the transaction scope only if the modelState is valid, indicating that no handled or unhandled errors occurred udring execution.

Method Details

CompleteIfValidAsync() public static method

Completes the transaction scope only if the modelState is valid, indicating that no handled or unhandled errors occurred udring execution.
public static CompleteIfValidAsync ( ITransactionScope scope, ModelStateDictionary modelState ) : Task
scope ITransactionScope
modelState ModelStateDictionary /// The to check for validity, usually accessed via /// controller.ModelState or similar. ///
return Task