-
-
Notifications
You must be signed in to change notification settings - Fork 43
AutoCommit
The AutoCommit package can be used to enable specific autocommit scenarios by setting the IModelObjectView.AutoCommit attribute to true. The implemented autocommit scenarios are described in the details section.
-
First you need the nuget package so issue this command to the
VS Nuget package consoleInstall-Package Xpand.XAF.Modules.AutoCommit.The above only references the dependencies and nexts steps are mandatory.
-
Ways to Register a Module or simply add the next call to your module constructor
RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.AutoCommitModule));
The module is not bound to DevExpress versioning, which means you can use the latest version with your old DevExpress projects Read more.
The module follows the Nuget Version Basics.
.NetFramework: net461
| DevExpress.ExpressApp | Any |
| Fasterflect.Xpand | 2.0.7 |
| JetBrains.Annotations | 2019.1.3 |
| System.Reactive | 4.3.2 |
| Xpand.Extensions | 2.201.28 |
| Xpand.Extensions.Reactive | 2.201.28 |
| Xpand.Extensions.XAF | 2.201.28 |
| Xpand.XAF.Modules.Reactive | 2.201.28 |
| Xpand.VersionConverter | 2.201.7 |
To Step in the source code you need to enable Source Server support in your Visual Studio/Tools/Options/Debugging/Enable Source Server Support. See also How to boost your DevExpress Debugging Experience.
If the package is installed in a way that you do not have access to uninstall it, then you can unload it with the next call at the constructor of your module.
Xpand.XAF.Modules.Reactive.ReactiveModuleBase.Unload(typeof(Xpand.XAF.Modules.AutoCommit.AutoCommitModule))The module satisfies the following conditions:
- When any
ObjectViewwithAutoCommitenabled a signal will be created out of the View.Closing and the QueryCanChangeCurrentObject events. For each signal emit theView.ObjectSpace.CommitChanges()is called. - When the
ASPxListEditorof anyListViewwithAllowEditinBatchEditmode andAutocommitloses focus (Client side) thenView.ObjectSpace.CommitChanges()is called.
Next screenshot is an example from ExcelImporter from the view tha maps the Excel columns with the BO members. Both the DetailView and its nested ListView have AutoCommit set to true.

