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 8091905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:10:16+00:00 2026-06-05T20:10:16+00:00

In the first query, I query list of steps for an ID. In the

  • 0

In the first query, I query list of steps for an ID. In the next query I check to see if that query contains an ID from new Query and C_S_Is_Button. But I get this error below. I have seen similar issues on this site but I havent figured out how to implement a solution into my problem.

Error:

The type arguments for method
‘System.Linq.Enumerable.Contains(System.Collections.Generic.IEnumerable,
TSource)’ cannot be inferred from the usage. Try specifying the type
arguments explicitly.

First Query

var QcheckA = from csd in l.LCSDatas
                join cls in l.LCSteps on csd.C_S_ID equals cls.C_S_ID
                join cde in lol.LCDefinitions on csd.C_S_ID equals cde.C_S_ID
                where csd.A_ID == _AID && cde.C_ID == data.C_ID
                select new 
                {
                    csd.C_S_ID
                };     

C Step. Find lowest step where button hasnt been clicked.

var QSID = (from cd in l.LCDefinitions
               join cs in l.LCSteps on cd.C_S_ID equals cs.C_S_ID                           
               where cs.C_S_Is_Button == true
                  && cd.C_ID == data.C_ID                              
                  && !QcheckA.Contains(cd.C_S_ID) //Error Here
               orderby cd.C_S_Order ascending
               select new
               {
                   cd.C_S_ID
               }).Take(1);

var SID = QSID.SingleOrDefault();

Any suggestions for this situtation? Thanks

  • 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-05T20:10:17+00:00Added an answer on June 5, 2026 at 8:10 pm

    You are creating an anonymous type in the first query and then in the second query you are trying to essentially compare an anonymous class type to a base type like an int or a Guid.

    In your first query try to be more explicit (cast it to the exact type it is, I’m assuming int but you might be using a Guid):

    select new  
    { 
        ID = (int)csd.C_S_ID 
    };     
    

    Then, in your second query, create another anonymous type that is like the first being explicit on what type of property it contains:

    && !QcheckA.Contains(new { ID = (int)cd.C_S_ID} ) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a MYSQL query in two steps. First, I get a list of
well this is my problem i use 2 source first query (select * from
First, from BOL : Queries that modify table variables do not generate parallel query
Let say I retrieve my list of data... First $Query = mysql_query(SELECT * FROM
Currently we retrieve a List of objects from the Spring SimpleJdbcTemplate. The first query
I have a query that JOINs some tables to get a list of products
I am trying to write a query that gets a list of trains from
My first query , retrieving date and hours worked from work_details of a given
The first query is: declare @myDate datetime = DATEADD(D,-2000,getdate()) SELECT * FROM [myTable] where
I use my first query to get the id and name of the user

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.