I have a table (named Location) that contains 3 columns - ID, Location, and LocationNewName. In the past(pre LLBLGen), I've used the sql COALESCE command to combine these columns into one value (If LocationNewName is null, then it returns the value for location).
I'm new to LLBLGen and am having difficulty duplicating this functionality through the provided classes. I've modified the LocationEntity class and added a new property called "LocationText" that will return the appropriate Location value. The problem that I am having is when I try to sort based on this new property.
The code I found in another thread is
Dim MySort As New SortExpression
MySort.Add(New SortClause(New EntityProperty("LocationText"), SortOperator.Ascending))
LLBLGenProDataSource.SorterToUse = MySort
and I get the following error:
Unable to cast object of type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityProperty' to type 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'.
Thanks,
Dave