StrataFrame Forum

BO.Count vs BO.CurrentDataTable.Rows.Count

http://forum.strataframe.net/Topic18730.aspx

By choyt - 8/26/2008

When I create a test project, these 2 properties always return the same value. Is this something to be relied upon or is there an underlying differenece?

I always ahve used the ..Rows.Count version but one of our Jr. guys has been using BO.Count and I'd hate to be bitten by this sometime in the future. Below is a sample of what I am referring to.

Thanks!

Dim a As New FSS.BO.Lookup.ActivityType

a.Fill()

Dim i As Int32 = a.Count (== 5)

Dim i2 As Int32 = a.CurrentDataTable.Rows.Count (==5)

By Greg McGuffey - 8/26/2008

I just checked the source code and Bo.Count = Bo.CurrentDataTable.DefaultView.Count = Bo.CurrentView.Count



So, it could bite you, if you apply filters to the BO.
By choyt - 8/26/2008

Thanks much...this is what I was concerned about.