I have an EntityCollection based on a view that has several properties in a partial class. I need to get a distinct set of rows but I also need the values from the properties. Otherwise I could use FetchTypedList with ResultSetFields.
Here's the query I want (the query is really on a view that does not have DISTINCT ).
Select DISTINCT
c.CustomerId, companyName
from customers c
join orders o
on c.CustomerId = o.CustomerId
where orderDate >= '1998-04-20'
However, the entity has a partial class with properties.
public partial class OrderHeaderViewEntity
{
public string CityRegionCountry
{
get { return string.Format("{0} {1} {2}", City, Region, Country); }
}
}
The partial class properties do not need to be considered for the DISTINCT, they are just concatenations or calculated fields as shown above.