Information générale
Catégorie:
The Mere Mortals .NET Framework
Awesome, everyone, thanks for your tips.
I created a simple subclass of an mmBusinessObject, called it Queries (in restrospect maybe not the best name but I'll deal with that later). Erased Queries.partial.cs since I'm not concerned the generator will overwrite anything later.
In Queries.cs now, I simply create ad hoc methods for whatever I want. eg.
public DataSet getMembershipSummary()
{
this.TableName = "crsMembershipSummary";
return this.GetDataSet("SELECT * FROM [qryProfile - Membership Summary]", CommandType.Text);
}
(Turns out the 2nd parameter on GetDataSet is kinda important, otherwise it looks for a stored procedure with the name of the 1st parameter). All my connection info is derived from the main business object so I don't have to worry about any of that, which is what I was really hoping to avoid!
Thanks... I'm on my way to wrapping this up.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement