Effect of BO.Filter and BO.Save()


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
I have a BO in which I edit several records based on the BO.Filter condition, so I do this:



1- Fill the BO with all records.

2- Apply filter #1 and modify some records.

3- Apply filter #3 and modify other records.

4- Remove BO.Filter and save the BO.





Now when I call the BO.Save() will the Save() method do the following:



1- Scan all the BO records to see which one have been modified?

2- Or apply some internal filter to just save the modified records without looping all the BO records?





I ask because originally the BO may have a couple of thousand records and need to know if the saving speed will be compromized in any way.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
When looking at anything on the BO that deals with dirty records, the filter applied is irrelevant as the CurrenDataTable is used instead of the current view.  Your applied filter will be left alone so there will not be any speed issues as the applied filter will be ignored for dirty records.

The Select() is used through ADO.NET on the data table to get any rows that have an added, modified, or deleted row state.  The same logic is taken into account during a save.  So you should not experience any performance issues in this regard.  Just so you know, the current data table is enumerated (not the view) when checking any to see if a row needs to be checked for validation, so the applied filter is ignored there as well.  In short, the save and row checking only looks at rows that have been modified, deleted, or added.

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks for the explanation. Now I know I don't have to worry about which BO.Filter is in effect in order to save all modified records.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search