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

  • SEARCH
  • Home
  • 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 9253051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:07:00+00:00 2026-06-18T11:07:00+00:00

After reading around I found that I could not use the .Contains method when

  • 0

After reading around I found that I could not use the .Contains method when querying CRM 2011 with the SDK Linq provider. This is a problem as I need to query for records which belong to a collection of Guid’s that get passed from my application. After more investigating I discovered LinqKit and the Predicate Builder; great! Using a single entityset in a query the predicate works fine:

var visits = Context.Crm_scheduled_visitSet.AsExpandable().Where(predicate);

The problem I have is when I expand the query to include a join to another entityset I cannot get the query to run when I include the predicate.
This is my query without the predicate which runs fine but I need to filter the Crm_scheduled_visitSet on a collection of Guid’s:

var scores = Context.Crm_scheduled_visitSet
    .Join(Context.crm_business_risk_scoreSet, v => v.Crm_scheduled_visitId.Value, s => s.crm_business_risk_score_id.Id, (v, s) => new
    {
        OrgID = v.Crm_client_id.Id,
        VisitStartdate = object.Equals(null, v.crm_actual_start_date) ? new DateTime() : v.crm_actual_start_date.Value,
        SectionId = s.crm_business_risk_section_id.Id,
        RisLevelId = s.crm_business_risk_level_id.Id,
        RiskRatingId = s.crm_business_risk_rating_id.Id
    });

What I need to do but this doesn’t run:

var scores = base.Context.Crm_scheduled_visitSet.AsExpandable().Where(predicate)
    .Join(base.Context.crm_business_risk_scoreSet, v => v.Crm_scheduled_visitId.Value, s => s.crm_business_risk_score_id.Id, (v, s) => new
    {
        OrgID = v.Crm_client_id.Id,
        VisitStartdate = object.Equals(null, v.crm_actual_start_date) ? new DateTime() : v.crm_actual_start_date.Value,
        SectionId = s.crm_business_risk_section_id.Id,
        RisLevelId = s.crm_business_risk_level_id.Id,
        RiskRatingId = s.crm_business_risk_rating_id.Id
    });
  • 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-18T11:07:01+00:00Added an answer on June 18, 2026 at 11:07 am

    I could not get this to work, resorted to using query expressions. I hope the CRM sdk Linq provider is improved in the future be more in line with features offered by Linq to Entities.

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

Sidebar

Related Questions

After reading around, I've realized that SQL ( MySQL in my case ) does
Background After reading around it seemed to me that Prawn is out and wkhtmltopdf
I am trying to wrap my head around PHP OOP and after reading everything
After reading MSDN-XAML Namespaces and MSDN-Understanding XAML Namespaces , I still do not understand
After reading a tutorial of Flash, I am still not sure what exactly is
After reading several other blog posts and articles (references found below) there appear to
I'm playing around with some image filters using Canvas after reading this post this
I really can't get my head around Activity, Intent and start.. even after reading
I'm new to HTML5/Canvas/Game programming, but have been tinkering around with it after reading
After reading monkeytalk faq from http://www.gorillalogic.com/testing-tools/monkeytalk/documentation/monkeytalk-faq : How does it all work? MonkeyTalk is

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.