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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:51:01+00:00 2026-05-26T21:51:01+00:00

I have 2 tables I have 3 stores each creating transactions and inserting them

  • 0

I have 2 tables

I have 3 stores each creating transactions and inserting them into the transaction table with their own store ID.
I want to be able to query the transaction table for all transactions where they are yet to be inserted into the TransactionMapping Table with the storeID that is making the search

e.g.

TransactionTable

Transaction Table

MappingTable

Mapping Table

I want to get all transaction information from Transaction where the matching TransactionId within TransactionMapping Table don’t contain the storeID from the store calling the query.

As you can see there are 4 transactions added to the transaction table for stores 1 & 2.

Looking at the mapping table both stores 1 & 2 have all transactions mapped however store 3 has nothing mapped.

How do I write the linq query to return the 4 records within the transaction table for store 3?

Any assistance in what is I would imagine is a straight forward query for someone not struggling on a Sunday.

  • 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-05-26T21:51:01+00:00Added an answer on May 26, 2026 at 9:51 pm

    I managed to sort it out. Thought I would post how I did it in case someone else had the same problem

     var query = (from a in ctx.TransactionTable
                  from b in ctx.MappingTable.Where(x => x.TransactionId== a.TransactionId).DefaultIfEmpty()
                     where a.StoreID!=storeID
                         select new
                                   {
                                      Transactions = a,
                                      Mapping = b
                                   }).ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that stores all the volunteers, and each volunteer will be
I have a SQL table where in each row I store the country and
Let's say you have a table which stores articles, and each article can have
I have an assortment of database objects (tables, functions, views, stored procedures) each scripted
here is my mysql and php code layout: I have 3 tables tableA stores
I have two tables, one stores the products and quantity we have bought, the
I have a table that stores user information. The table has a userid (identity)
I have a table that stores various clients I have done work for, separated
I have a table which stores test results like this: user | score |
Imagine I have a table which stores a series of sparse vectors. A sparse

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.