General information
Category:
The Mere Mortals .NET Framework
Title:
Complex sql statement in BO?
Hi all!
After studying the concepts (not yet productively) of MM I have this question: I often need to give to the user a user interface that allows him to select his data out of a free combination of different criteria. Now Business Object's methods like GetOrdersByCustomerId are not usefull for this.
What would be the "right" way to do it? As Kevin is reccommending to work with Stored Procedures, in this case I think it is not the ideal way, I'd rather use dynamic SQL and build my SQL statement in my Business tier, right? Would you build something like a General method in the BO, such as GetDataFromFreeWhereClause where I build my Where Clause programmatically? Or even (sorry!), as ugly as it is, to construct a where-clause string in the user interface (presentation tier) through the settings of different controls, store it in a form variable and send this to the business tier?
Thanks for sharing your ideas,
Patrick
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only