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
*This post is locked for comments