This issue is pretty common with .NET ORM frameworks, because a lot of them rely on the fact that LINQ in .NET (basically queries written in C# syntax in code instead of in SQL) are interpreted / executed on an as needed basis and deferred until the data they work with fully needed.
When calling Queryable LINQ results from other code, any new LINQ statements being called are just tacked on to the deferred statements until there is some kind of final call to get the data (like Count(), Sum(), ToList(), etc.) When that call happens, if there is even one piece of code inside one of the LINQ statements that the SQL query parser can't figure out how to turn into SQL, the whole statement fails to parse. Here's a more concrete example:
DateTime after = new DateTime(2016,1,1);
decimal total = DatabaseSession.Query<DataType>()
.Where(item => item.Created >= after)
.Where(item => item.Status == Status.Active)
.Where(item => item.Components.Sum(component => component.Price) < 1000) // Sum here may not parse happily as it would require a separate join in the DB
.Sum(item => item.Component.Sum(component => component.Price);
...
decimal total = DatabaseSession.Query<DataType>()
.Where(item => item.Created >= after)
.Where(item => item.Status == Status.Active)
.ToList() // This forces the parsing and pulling of the data
.Where(item => item.Components.Sum(component => component.Price) < 1000) // Data already pulled, so no parsing to SQL needed now
.Sum(item => item.Component.Sum(component => component.Price);
Some ORMs actually have a separate query building library that helps to hint at what you mean for certain situations like this to work around the shortcomings of the parser. They may also have an extensible framework in place to let you define exactly what something like a Sum inside a query should do.