1. With DAL2, is there any way to run a DISTINCT query using DAL2 objects. In the DAL2 development video there was a find method shown that allowed certain "WHERE" and "ORDER BY" parameters to be passed, but I don't see a way to pass through a DISTINCT parameter.
2. With DAL2, can objects be joined? I ask this because some of the custom profile fields are separated by the UserProfile table and the ProfilePropertyDefinition table, and if I want to databind a control, as mentioned in question #1, I'd need databind the control (e.g. listbox) to a query of the joined tables with DISTINCT/singular values displayed for the data selection.
As an example, I have a list box of values on a form to which I want to bind a query with two joined tables. An example of the raw TSQL syntax is:
SELECT DISTINCT UserProfile.PropertyValue FROM ProfilePropertyDefinition INNER JOIN UserProfile ON ProfilePropertyDefinition.PropertyDefinitionID = UserProfile.PropertyDefinitionID WHERE PropertyName = 'myCustomProfileFieldName''
Is there anyway to return a similar result to the above query using DAL2?