﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » businesslayer.getenumerable(True)</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 14 May 2026 16:31:53 GMT</lastBuildDate><ttl>20</ttl><item><title>businesslayer.getenumerable(True)</title><link>http://forum.strataframe.net/FindPost26545.aspx</link><description>Poking around in source code I find the overload for businesslayer.getenumerable&lt;br&gt;
&lt;br&gt;
[codesnippet]        &lt;EditorBrowsable(EditorBrowsableState.Never)&gt; _&lt;br&gt;
        Public Function GetEnumerable(ByVal separateInstances As Boolean) As IEnumerable&lt;br&gt;
            If separateInstances Then&lt;br&gt;
                '-- Create a new business binding source that will be disposed after use&lt;br&gt;
                Dim bbs As New BusinessBindingSource(True)&lt;br&gt;
                bbs.BusinessObject = Me&lt;br&gt;
                Return bbs&lt;br&gt;
            Else&lt;br&gt;
                Return Me.GetEnumerable()&lt;br&gt;
            End If&lt;br&gt;
        End Function&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
This looks cool.  I'm trying to come up with a scenario where is can be useful as I am pretty sure there may be a lot of them.  &lt;br&gt;
&lt;br&gt;
Suggestions?</description><pubDate>Tue, 23 Mar 2010 20:13:52 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: businesslayer.getenumerable(True)</title><link>http://forum.strataframe.net/FindPost26613.aspx</link><description>Thanks Dustin&lt;br&gt;
&lt;br&gt;
I haven't done any web stuff with SF yet but good to know it will be there when I need it :)&lt;br&gt;</description><pubDate>Tue, 23 Mar 2010 20:13:52 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: businesslayer.getenumerable(True)</title><link>http://forum.strataframe.net/FindPost26608.aspx</link><description>This has to do with working through a web environment.&amp;nbsp; The WBBS actually uses a shared data table for parsing.&amp;nbsp; But the issue on the web is that a root BO is most likely stored in the session.&amp;nbsp; So you may have two objects referencing the same BO which would cause an issue.&amp;nbsp; This creates a separate BBS instance so that there is not any cross pollination in a web environment when referencing the same BO through multiple controls using the standard WBBS binding.&lt;P&gt;I talked to Trent about it to come up to speed (I've never had occasion to use that override myself), and he mentioned that it was recently updated:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: green; FONT-SIZE: 10pt"&gt;[codesnippet]''' &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Changed 3/8/2010 for forum post http://forum.strataframe.net/FindPost26315.aspx.&amp;nbsp; The issue was that a clean up property&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' had been added between 1.6 and 1.7 to clean up memory as DevExpress grids (amongst others) would not automatically call the &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Dispose of the enumerator, creating memory leaks.&amp;nbsp; However, on the web side of things, this caused the shared data table&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' to be destroyed before it was ever used.&amp;nbsp; So the autoDisposeSourceAfterUse param was added so that each environmental&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' BBS could set this explicitly.&amp;nbsp; As of 3/8/2010, the only place that set the second parm as False was the WebBusinessBindingSourceView&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' so that DevExpress web grids would work.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EditorBrowsable(EditorBrowsableState.Never)&amp;gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Function GetEnumerable(ByVal separateInstances As Boolean, ByVal autoDisposeSourceAfterUse As Boolean) As IEnumerable&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If separateInstances Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Create a new business binding source that will be disposed after use&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim bbs As New BusinessBindingSource(autoDisposeSourceAfterUse)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bbs.BusinessObject = Me&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return bbs&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Me.GetEnumerable()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function[/codesnippet]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 10pt"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;</description><pubDate>Tue, 23 Mar 2010 13:28:06 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item></channel></rss>