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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:43:25+00:00 2026-06-16T02:43:25+00:00

How can I convert the LINQ query below using LAMBDA Expressions ? var select

  • 0

How can I convert the LINQ query below using LAMBDA Expressions ?

    var select = from si in db.San_Imovel
                 join sic in db.San_Imovel_caracteristica
                 on si.Imovel_Id equals Convert.ToInt64(sic.Imovel_Id)
                 join sf in db.San_Filial
                 on si.Credenciada_Id equals sf.Credenciada_Id
                 where si.Credenciada_Id == credenciada_Id
                 && (si.GrupoImovel_Id.ToString().Contains("1") || si.GrupoImovel_Id.ToString().Contains("2"))
                 && (si.Status_Id.ToString().Contains("1") || si.Status_Id.ToString().Contains("12"))
                 && si.NomeArquivo != null
                 && (si.Imovel_Id.ToString().Contains(""))
                 select new
                 {
                     si.Celula_Id,
                     si.Credenciada_Id,
                     si.Imovel_Id,
                     si.NomeArquivo,
                     si.TipoDsc1,
                     si.BairroDsc1,
                     si.AreaRealPrivativa,
                     sic.VagasGaragem,
                     si.ValorImovel,
                     si.ValorCondominio,
                     si.ValorIPTU,
                     si.Lat2,
                     si.Lon2,
                     sf.ApelidoCredenciada,
                     sf.ddd,
                     sf.TelefoneVenda,
                     sf.TelefoneLocacao,
                     sf.Email,
                     si.Bairro1,
                     si.NomeCidade,
                     si.Transacao_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-16T02:43:26+00:00Added an answer on June 16, 2026 at 2:43 am
    var query = 
       db.San_Imovel
         .Join(db.San_Imovel_caracteristica,
               si => Imovel_Id,
               sic => Convert.ToInt64(sic.Imovel_Id),
               (si, sic) => new { si, sic })
         .Join(db.San_Filial,
               x => x.si.Credenciada_Id,
               sf => sf.Credenciada_Id,
               (x, sf) => new { x.si, x.sic, sf })
         .Where(x => x.si.Credenciada_Id == credenciada_Id &&
                     (x.si.GrupoImovel_Id.ToString().Contains("1") || 
                      x.si.GrupoImovel_Id.ToString().Contains("2")) &&
                     (x.si.Status_Id.ToString().Contains("1") || 
                      x.si.Status_Id.ToString().Contains("12")) &&
                      x.si.NomeArquivo != null &&
                     (x.si.Imovel_Id.ToString().Contains(""))
         .Select(x => new {
                         x.si.Celula_Id,
                         x.si.Credenciada_Id,
                         x.si.Imovel_Id,
                         x.si.NomeArquivo,
                         x.si.TipoDsc1,
                         x.si.BairroDsc1,
                         x.si.AreaRealPrivativa,
                         x.sic.VagasGaragem,
                         x.si.ValorImovel,
                         x.si.ValorCondominio,
                         x.si.ValorIPTU,
                         x.si.Lat2,
                         x.si.Lon2,
                         x.sf.ApelidoCredenciada,
                         x.sf.ddd,
                         x.sf.TelefoneVenda,
                         x.sf.TelefoneLocacao,
                         x.sf.Email,
                         x.si.Bairro1,
                         x.si.NomeCidade,
                         x.si.Transacao_ID
                     });
    

    BTW you don’t need to convert whole query to method syntax. You can convert only filtering where part.

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

Sidebar

Related Questions

Can anyone help me, to convert the below sql query to Linq (Lambda Expressions).
I can convert this query with linqer. select * from v#gharardad inner join (select
How can I convert this query to linq to entities with entity framework: SELECT
I'm not able to call take method from below linq query var data =
Is it possible to convert this code at below, written by using Query(linq) api
I have Sql query: SELECT News.NewsId, News.Subject, Cm.Cnt FROM dbo.News LEFT JOIN (SELECT Comments.OwnerId,
I have the following Linq query: (from container in Container join containerType in ContainerType
I have this LINQ query: XNamespace ns = NAMESPACE; var items = (from c
How can I convert following SQL query to LINQ in C#? I don't need
How can I convert following SQL query to LINQ in C#? I don't need

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.