Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Register Biz Obj within console application
Message
 
To
22/10/2008 15:15:38
Rick Forbes
Brotherhood of Maintenance of Way Employ
Royal Oak, Michigan, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01356391
Message ID:
01356529
Views:
18
Rick,

>Does anyone know the proper way to register and use a Business Object within a Console Application. There are no examples in the documentation and it doesn't seem to be as straight forward as I was hoping. I'm trying to create a console application that uses previously defined Busness objects.

The information in the MM .NET Dev Guide topic "Creating a New Windows Service" is applicable here. What you are most likely missing is the instantation of an application class. Basically,all you need to do is create a static field (class-level variable) to hold a reference to the application object:
/// <summary>
/// Static field that contains a reference to the application object
/// </summary>
public static OakLeaf.MM.Main.mmAppBase App;
Then add a line of code that instantiates the app object (execute this code before instantiating any business objects):
App = new AppBase();
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform