All-Star
48570 Points
18079 Posts
Mar 14, 2019 10:01 AM|PatriceSc|LINK
Then try :
Amount = x.ToList().Where(z => ConvertNotesToXml.Deserialize(z.XmlDetails).Last().Action == "Reversal Of Tax Charges").Sum(y => (y.Charge * -1)),
to force running the db query first (note that it means you get ALL rows from your db) before further processing on the client side.
All-Star
48570 Points
18079 Posts
Re: LINQ to Entities does not recognize the method
Mar 14, 2019 10:01 AM|PatriceSc|LINK
Then try :
Amount = x.ToList().Where(z => ConvertNotesToXml.Deserialize(z.XmlDetails).Last().Action == "Reversal Of Tax Charges").Sum(y => (y.Charge * -1)),
to force running the db query first (note that it means you get ALL rows from your db) before further processing on the client side.