﻿<?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?)  » How To - Completely non-UI use of BOs.</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 12 Sep 2026 12:47:40 GMT</lastBuildDate><ttl>20</ttl><item><title>How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21761.aspx</link><description>Does anyone have a quick example of how to leverage an BO as defined in an external BO Library from within an non-UI application, such as a Console application ? I presume if the BO is configured and working within it's own BO LIbrary project then I should be able to reference the DLL and use it without having to manually implement SetDataSources et al ?&lt;br&gt;
&lt;br&gt;
I can see various postings skirting round the issue on the forum but no concrete examples.&lt;br&gt;
&lt;br&gt;
Many thx in advance ...</description><pubDate>Tue, 03 Feb 2009 13:23:34 GMT</pubDate><dc:creator>Alan P Bourke</dc:creator></item><item><title>RE: How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21795.aspx</link><description>Create a Root Business Object and have all your BO's Inherit from it with your connection string.&amp;nbsp; What we do is provide a utility that sets the Connection although it is in a Non-UI Configuration.&amp;nbsp; The Root BO knows how to connect and cascades down to the LocalHost embedded string if not connected.&amp;nbsp;&amp;nbsp; We also add a few other functions that are used all the time like&amp;nbsp;a FIllAllRecords Data Retrieval Method.</description><pubDate>Tue, 03 Feb 2009 13:23:34 GMT</pubDate><dc:creator>Richard Keller</dc:creator></item><item><title>RE: How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21783.aspx</link><description>Glad it helped!</description><pubDate>Tue, 03 Feb 2009 09:08:43 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21780.aspx</link><description>Absolutely, thanks Greg.</description><pubDate>Tue, 03 Feb 2009 03:19:59 GMT</pubDate><dc:creator>Alan P Bourke</dc:creator></item><item><title>RE: How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21776.aspx</link><description>The basic architecture allows for BOs to be loosely coupled to the data source. I.e. this allows you to hot swap datasources on the fly as needed (like you might do if you provide online/offline data access or if you have some sort of fall back database server). Also, this allows for many BOs to share the same data source.  The datasource encapsulates the connection info, while the BO encapsulates data access and business rules.&lt;br&gt;
&lt;br&gt;
Is that making more sense?</description><pubDate>Mon, 02 Feb 2009 15:06:39 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21772.aspx</link><description>Thanks. I guess I have a gap in my understanding thus far - I assumed that the BO would know how to connect to the data already without having to set up a data source.&lt;br&gt;
&lt;br&gt;
Ah well, onward ...</description><pubDate>Mon, 02 Feb 2009 12:06:30 GMT</pubDate><dc:creator>Alan P Bourke</dc:creator></item><item><title>RE: How To - Completely non-UI use of BOs.</title><link>http://forum.strataframe.net/FindPost21763.aspx</link><description>You can most definitely do this and there really isn't much to explain other than the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add a reference to your BO library within your console app&lt;/LI&gt;&lt;LI&gt;It will also require a reference to the MicroFour StrataFrame Base and MicroFour StrataFrame Business assemblies&lt;/LI&gt;&lt;LI&gt;Next, you will need to setup your datasources prior to attempting to execute a query on the BO.&amp;nbsp; This is generally done in the program.cs or Appmain.vb files in the SetDataSOurces method in a standard SF app.&amp;nbsp; But all you need to do is setup the datasource manually prior to executing queries on the BO.&lt;BR&gt;&lt;BR&gt;[codesnippet]MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New SqlDataSourceItem("","MyConnectionString"))[/codesnippet]&lt;/LI&gt;&lt;/UL&gt;</description><pubDate>Mon, 02 Feb 2009 09:26:25 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>