I have the following code that filters using the entity fields but i also want to pass in search criteria and add it on the fly. But since Im using projection, i cant add the filters using the entity fields. does this make sense? basically, how can i write this by adding an additional search criteria??
public DealAggregateDTO GetMostRecentAggregateByCitySlug(string slug, string search)
{
return (from d in MetaData.Deal
where d.City.SlugUrl == slug
where d.StartDate >= SystemTime.Now()
orderby d.StartDate ascending
select new DealAggregateDTO
{
DealId = d.DealId,
Description = d.Description
});
// add filter here...
}