Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9229763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:39:09+00:00 2026-06-18T05:39:09+00:00

I was using the same query before it was working fine. Then I decided

  • 0

I was using the same query before it was working fine. Then I decided to use complied query. So I had to make few changes to the code.

Now when I try to execute the code, I get the error message “Unsupported overload used for query operator ‘Where’.
The where clause which I generate from “approvalHelper.GetWhereClauseForApprovalSimpleSearch();” has been tested and works fine.
Only doesn’t work for the complied query part as shown in my code

code :

// Complied Query Class
public static class CompliedQuery
{

    public static Func<GDataContext, Expression<Func<View_ApprovalSimple, bool>>, IQueryable<View_ApprovalSimple>> getApprovalSimple =


    CompiledQuery.Compile<GDataContext, Expression<Func<View_ApprovalSimple, bool>>, IQueryable<View_ApprovalSimple>>(
           (db, whereclause) => (from results in db.View_ApprovalSimples.AsExpandable().Where(whereclause)
                                select results));        
}

// this is what is passed into the where clause; Body = {(vas.siteId = 1)}


//the Calling code
public static List<View_ApprovalSimple> GetApprovalSimple(ApprovalsSearchHelperClass _approvalHelper)
{
    Expression<Func<View_ApprovalSimple, bool>> whrClause = approvalHelper.GetWhereClauseForApprovalSimpleSearch();

    //whrclause; Body = {(vas.siteId = 1)}
    try
    {
        using (GDataContext db = new GDataContext())
        {
            if (whrClause != null)
            {
                var varResults = CompliedQuery.getApprovalSimple(db, whrClause);

                return varResults.ToList();
            }
        }  
    }
    catch (Exception ex)
    {
        // code to handle error        
    }
    finally
    {          
    }

    return null;    
}

Any idea what new changes I might have to implement?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:39:11+00:00Added an answer on June 18, 2026 at 5:39 am

    First I was a bit sceptical about this, ran out of options so I finally tried it and it did work.
    please follow the link to see answer
    Steve’s Blog
    Great work Steve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using google app engine. Before everything was working fine but now when
I was using the exact same query to get data from two tables. when
I wrote two code both are same Using NSURLConnection and Using AFNetworking. My NSURLConnection
The following batch request for retrieve friends using the same app is not working:
I have a query which returns some results, and then I'm using a while
I'm working with ASP.NET MVC3 using EF and Code First. I'm writing a simple
I had the debugger working in pgAdminIII at one point, some time before upgrading
multiple webapp running on same tomcat using same jvm. sometime, one webapp that have
I am using two web projects and both using same Database of MS SQL
How can i send two Model from controller to view using same action

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.