LINQ to Entities does not recognize the method 'Method name' method
I'm having a similar problem that was asked here: LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression I'm trying to paginate my source, but in my case, I can't put the result of GetPropertyValue in a variable, because I need x to do that: public IEnumerable<TModel> Paginate(IQueryable<TModel> source, ref int totalPages, int pageIndex, int pageSize, string sortfield, SortDirection? sortdir) { totalPages = (int)Math.Ceiling(source.Count() / (double)pageSize); if (sortdir == SortDirection.Descending) {