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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:57:29+00:00 2026-06-15T03:57:29+00:00

I have two tables: baswareCatalog.FlowCurrent and baswareCatalog.Doc. They both contain the attribute DocId. The

  • 0

I have two tables: baswareCatalog.FlowCurrent and baswareCatalog.Doc.
They both contain the attribute DocId.
The Doc-table also has the attributes LastExpireDate and Status.
FlowCurrent-table also has the attribute RecipientName.
I want to retrieve a collection of Doc, where the DocId of the item is the same in both tables.

Furthermore, this condition must be true: flowCurrent.RecipientName.Contains(userFullName)

I tried the following, but I don’t know if it is correct.

var docitemIQueryable = from flowCurrent in baswareCatalog.FlowCurrent join 
                        document in baswareCatalog.Docs on 
                        flowCurrent.DocId equals document.DocId 
                        where flowCurrent.RecipientName.Contains(userFullName) 
                        select new
                        {
                          Items = baswareCatalog
                                  .Docs
                                  .Where(b => b.DocId == flowCurrent.DocId)
                        };

The return-value is

'interface System.Linq.IQueryable<out T>'.
T is 'a' 
Anonymous Types: 'a is new {IQueryable<Doc> Items }'

How do I retrieve a collection of Doc that I can iterate over?

  • 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-15T03:57:30+00:00Added an answer on June 15, 2026 at 3:57 am

    Two things:

    1. System.Linq.IQueryable is a collection that you can iterate over. You can put it in a foreach loop or do whatever you want with it. Or you can use .ToList() if you want to immediately materialize it.
    2. You’re doing extra work that you don’t need to do in your query. You’re doing a join between FlowCurrent and Docs, but then you’re taking the results and going right back to Docs again. You don’t need to do that.

    Assuming what you care about is just the stuff in Docs, try this:

    var docitemIQueryable = from flowCurrent in baswareCatalog.FlowCurrent 
                            join document in baswareCatalog.Docs on 
                                flowCurrent.DocId equals document.DocId 
                            where flowCurrent.RecipientName.Contains(userFullName) 
                            select document;
    

    That will give you a collection of rows with all the fields in Docs. If you need some of the stuff in FlowCurrent as well then you’ll need to do something more like this:

    var docitemIQueryable = from flowCurrent in baswareCatalog.FlowCurrent 
                            join document in baswareCatalog.Docs on 
                                flowCurrent.DocId equals document.DocId 
                            where flowCurrent.RecipientName.Contains(userFullName) 
                            select new {
                                document.DocId, flowCurrent.blahblah, ...
                            };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables, orders and old_orders. Each table has some similar fields and
I have two tables tblDoc and tblrev tblDoc DocID DocNum 1 Doc-001 2 Doc-002
I have two tables a and b . Table a has a field named
I have two tables: table a ida valuea 1 a 2 b 3 c
I have two tables one with ID and NAME table 1 ID | NAME
I have two tables user table user_id | name | 1 | peter |
I have two tables, a user table and a application table: User id username
I have two tables connected with one to many relationship. Parent Table is a
Have two tables say ABC and XYZ and contain one column which data will
I have two tables: one table (okay, it's a view), vComputer, lists many computers

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.