Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BO generator work with custom data adapter?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01276961
Message ID:
01277134
Vues:
16
Brian,

>I have a project that is going to use SQL CE. I have coded a custom data adapter in the BO project to use CE. What would I have to do to get the BO generator to use that class?

First, pick a data access class name and use it in the "databases" section of yyour app.config file, for example, "DataAccessSqlCE":
<add key="CustA\Northwind\DataAccessClass" value="DataAccessSqlCE" />
Next, you must add a reference to your SQL CE assembly to the MMBusinessLayerGenerator project.

Finally, go to the Factory.cs file in the MMBusinessLayerGenerator project and add an entry like this:
public override mmDataAccessBase CreateDataAccessObject(string currentDatabaseSet, string databaseKey, ArrayList dataAccessClassList, string connectionString)
{

	if (mmVSSolution.GetDataAccessClassFromList(ref currentDatabaseSet, databaseKey, dataAccessClassList).ToLower() == "dataaccesssqlce")
	{
		return new mmDataAccessPostgres();
	}
	else
	{
		return base.CreateDataAccessObject(currentDatabaseSet, databaseKey, dataAccessClassList, connectionString);
	}

}
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform