Skip to content

Latest commit

History

History

AutoCommit

GitHub issues GitHub close issues

About

The AutoCommit package can be used to enable specific autocommit scenarios by setting the IModelObjectView.AutoCommit.

Details

This is a platform agnostic module that satisfies the following conditions:

  1. When any ObjectView with AutoCommit enabled a signal will be created out of the View.Closing and the QueryCanChangeCurrentObject events. For each signal emit the View.ObjectSpace.CommitChanges() is called.
  2. When the ASPxListEditor of any ListView with AllowEdit in BatchEdit mode and Autocommit loses focus (Client side) then View.ObjectSpace.CommitChanges() is called.

image


Possible future improvements:

  1. Any other need you may have.

Let me know if you want me to implement them for you.

Examples

The module is integrated with the ExcelImporter.

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.

image

Installation

  1. First you need the nuget package so issue this command to the VS Nuget package console

    Install-Package Xpand.XAF.Modules.AutoCommit.

    The above only references the dependencies and nexts steps are mandatory.

  2. Ways to Register a Module or simply add the next call to your module constructor

    RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.AutoCommitModule));

Versioning

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.

Dependencies

.NetFramework: net6.0

DevExpress.ExpressApp Any
Xpand.VersionConverter 4.232.3
Xpand.Extensions 4.232.3
Xpand.Extensions.Reactive 4.232.3
Xpand.Extensions.XAF 4.232.3
Xpand.XAF.Modules.Reactive 4.232.3
System.Reactive 6.0.0
Fasterflect.Xpand 2.0.7
System.Text.Json 7.0.2
System.Threading.Tasks.Dataflow 7.0.0
Xpand.VersionConverter 4.232.3

Issues-Debugging-Troubleshooting

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))

Tests

The module is tested on Azure for each build with these tests. All Tests run as per our Compatibility Matrix