Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Access object creation in mmBusinessObject is fragi
Message
 
To
04/05/2007 00:20:32
Walter Nicholls
Cornerstone Software Ltd
Auckland, New Zealand
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01222394
Message ID:
01223226
Views:
39
Walter,

>Observed: If a DataAccessClass is misspelt in app.config, the code assumes it is DataAccessSql
>Expected: DataAccessSql should only be assumed if a class is NOT specified (or String.Empty). If the class is not recognized then an exception should be thrown

Actually, this is by design...in fact if you completely leave the specification out of the .config file it will also assume SQL Server data access. We did this because the vast majority of .NET developers are accessing SQL Server data on the back end.

>Also while I think of it, seems strange that this code is in mmBusinessObject, might be sensible to delegate this to mmAppBase.Factory.CreateDataAccessObject(classname) which would theoretically enable bizobj layer to be database-independent, if I were to implement say CreateDataAccessPostgres() in the factory class - although in practice don't know how often that would be achieved!

Actually, CreateDataAccessObject() is eventually in the call chain.

You mention Postgres...are you trying to access Postgres data? As we speak we are implementing a Postgres-specific data access class in MM .NET that uses the npgsql .NET data provider (http://pgfoundry.org/projects/npgsql).

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