Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

The method 'OrderByDescending' cannot follow the method 'Select' or is not supported. in plugin

$
0
0

Hello experts ,

I'am facing the following :The method 'OrderByDescending' cannot follow the method 'Select' or is not supported. Try writing the query in terms of supported methods or call the 'AsEnumerable' or 'ToList' method before calling unsupported methods when using a plugin.

var PrestationPrice = (from pricePrest
in context1.pricePrestSet
where pricePrest.pricelistgroupid == oppProdu.pricelistgroupid &&
pricePrest.hotelid== oppProdu.hotelid
&& (pricePrest.validit_start_date <= oppProdu.start_date.Value.AddDays(1) && pricePrest.rea_validit_end_date >= oppProdu.start_date.Value.AddDays(1))
select new { pricePrest.adultprice, pricePrest.childprice }).OrderByDescending(p => p.adultprice).ThenByDescending(e => e.childprice).ToList();

productPrice = PrestationPrice.First().adultprice.Value;
productPrice = PrestationPrice.First().childprice.Value;

Thank you 


Viewing all articles
Browse latest Browse all 55831


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>