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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:23:43+00:00 2026-06-09T17:23:43+00:00

I have the following query: var query = from modules in _Context.Modules join moduleStrings

  • 0

I have the following query:

var query =
     from modules in _Context.Modules
     join moduleStrings in _Context.ModuleStrings on modules.MID equals moduleStrings.MID
     join strings in _Context.Strings on moduleStrings.SID equals strings.SID
     join stringTexts in _Context.StringTexts on strings.SID equals stringTexts.SID into stringsEmpty
     from stringTexts in stringsEmpty.DefaultIfEmpty()
     join languages in _Context.Languages on stringTexts.LID equals languages.LID
     where modules.MID == MID && LID == languages.LID
     select new GridData6S() 
     { 
         Name = strings.Name,
         Text = stringTexts != null ? stringTexts.Text : ""
     };

I want to join it so that I see the empty text if stringTexts is null.

It’s probably some small thing, but I have been looking at this for an hour and can’t figure it out. This is the closest I got.

  • 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-09T17:23:44+00:00Added an answer on June 9, 2026 at 5:23 pm

    You are filtering out any language that is not LID=languages.LID so when languages/stringTexts are null this condition will never be true.

    Also as the only reason you seem to be joining to the languages table is to get the LID which is also the join condition, you could just skip joining to languages

    The same is true for modules…..

    This might help and is a little simpler

    var query = 
      from moduleStrings in _Context.ModuleStrings  
      join strings in _Context.Strings on moduleStrings.SID equals strings.SID 
      join stringTexts1 in _Context.StringTexts.Where(x=>x.LID==LID) on strings.SID equals stringTexts.SID into stringsEmpty 
      from stringTexts in stringsEmpty.DefaultIfEmpty() 
      where moduleStrings.MID == MID 
      select new GridData6S()  
      {  
          Name = strings.Name, 
          Text = stringTexts != null ? stringTexts.Text : "" 
      }; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following query: var result = ( from role in db.Roles join user
I have the following Linq query: var tmp = from container in Container join
I have the following query var query = from f in _db.Production join g
I have the following query: var q = from x in content_item.All() join y
I have the following query var customers = from customer in context.tblAccounts join assoc
I have the following join statement: var query = from holding in dHoldList join
I have the following query: var req= (from tl in resultlist where (tl.Message.StartsWith(Do not
I have the following LINQ query: var queryGroups = (from p in db.cl_contact_event select
Lets suppose that I have the following simple query var q = from p
i have the following query: $timecheck = $db->query(SELECT (B <= NOW()) AS var FROM

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.