﻿<?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 / Business Objects and Data Access (How do I?)  / Built-in FillAll method? / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Sun, 07 Sep 2008 17:02:12 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Built-in FillAll method?</title><link>http://forum.strataframe.net/Topic15508-6-1.aspx</link><description>Aaron,&lt;/P&gt;&lt;P&gt;Greg's response is right on target.  The truth is that a framework is supposed to help in the area of "best-practices" as well as many other things.  Though this wouldn't be that difficult to implement, I think that it would be overused and then there would be a whole series of questions about performance out here...so like Greg, said, it is easy to add and you can do it very easily, but this is one of those things that we have thought about putting in before and keep coming back around to, "it's probably not a good idea." :D</description><pubDate>Thu, 10 Apr 2008 17:15:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Built-in FillAll method?</title><link>http://forum.strataframe.net/Topic15508-6-1.aspx</link><description>Thanks Greg.&lt;/P&gt;&lt;P&gt;I had thought about subclassing the Business Layer and using the FieldEnums to replace the SELECT * as we intend to use Notification Services.&lt;/P&gt;&lt;P&gt;As you say it isn't a big job, I was just being lazy :)&lt;/P&gt;&lt;P&gt;By the way, is this forum always so quick with a response? I have come from one where you are lucky to get a reply in days let alone minutes! :)&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aaron</description><pubDate>Thu, 10 Apr 2008 16:30:52 GMT</pubDate><dc:creator>Aaron Young</dc:creator></item><item><title>RE: Built-in FillAll method?</title><link>http://forum.strataframe.net/Topic15508-6-1.aspx</link><description>I can't say why the SF team didn't implement this, but I can guess.  There is just too much variation in how you might fill a BO for this to make sense in a framework.  Also, it is very easy to implement. Third it is very easy to implement so you don't have to implement it for every BO that might need it.&lt;br&gt;&lt;br&gt;To implement it so you don't have to keep adding the same method to all your list BOs, you could just subclass the BusinessLayer, then inherit from you new class.  I.e. (in vb)&lt;br&gt;[codesnippet]Public Class ListBOBase&lt;br&gt;  Inherits BusinessLayer&lt;br&gt;  Public Sub FillAll()&lt;br&gt;    Using cmd As New SqlCommand()&lt;br&gt;      cmd.CommandText = String.Format("Select * From {0}",Me.TableName)&lt;br&gt;      Me.FillDataTable(cmd)&lt;br&gt;    End Using&lt;br&gt;  End Sub&lt;br&gt;End Class[/codesnippet]&lt;br&gt;&lt;br&gt;To use:&lt;br&gt;[codesnippet]Public Class SpecificListBO&lt;br&gt;  Inherits ListBOBase&lt;br&gt;  ' Because this class inherits ListBOBase, it has the FillAll() Method...&lt;br&gt;End Class[/codesnippet]&lt;br&gt;&lt;br&gt;Hope this helps!</description><pubDate>Thu, 10 Apr 2008 16:19:55 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>Built-in FillAll method?</title><link>http://forum.strataframe.net/Topic15508-6-1.aspx</link><description>I am new here so please excuse my ignorance :)&lt;/P&gt;&lt;P&gt;I have been reading through the help file and I thought it would be a benefit to offer a built-in FillAll() population method which simply reads all records into the BO. I can see quite a large no of BOs in our application (i.e. lookup lists, etc.) that would benefit from this. I know I can add my own FillAll() to each BO but, as I am lazy, it would be nice if it was built-in :)&lt;/P&gt;&lt;P&gt;Is there a reason why you have decided not to implement it?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aaron</description><pubDate>Thu, 10 Apr 2008 15:58:00 GMT</pubDate><dc:creator>Aaron Young</dc:creator></item></channel></rss>