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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:10:50+00:00 2026-06-14T08:10:50+00:00

How can I do this query using LINQ and LAMBDA ? QUERY Select san_negocio.imovel_id

  • 0

How can I do this query using LINQ and LAMBDA ?

QUERY

Select san_negocio.imovel_id
      ,san_negocio.negocio_id
      ,san_imovel.credenciada_id
      ,san_proposta.proposta_id
      ,san_proposta.credenciada_id
  from san_negocio
  join san_proposta
    on san_negocio.imovel_id = san_proposta.imovel_id
  join san_imovel
    on san_negocio.imovel_id = san_imovel.imovel_id
 where san_negocio.credenciadacaptadora_id is null
   and san_negocio.credenciadavendedora_id is null
   and san_proposta.statusproposta_id = 2

I’ve tried:

var objetos = db.San_Negocio.Join(db.San_Proposta, a => a.Imovel_Id, b => b.Imovel_Id, (a, b) => new { San_Negocio = a, San_Proposta = b })                
    .Join(db.San_Imovel, a => a.San_Negocio.Imovel_Id, c => c.Imovel_Id, (a, c) => new { San_Negocio = a, San_Imovel = c })
    .Where(a => a.San_Negocio.San_Negocio.CredenciadaCaptadora_Id == null && a.San_Negocio.San_Negocio.CredenciadaVendedora_Id == null)
    .Select(a => new { a.San_Negocio.San_Negocio.Negocio_Id, 
            a.San_Negocio.San_Negocio.Imovel_Id, 
            a.San_Imovel.Credenciada_Id });

My doubt is in my Select. How can I call my San_Proposta table ?

  • 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-14T08:10:51+00:00Added an answer on June 14, 2026 at 8:10 am

    Here is a proper linq statement:

    from neg in db.san_negocio
    join prop in san_proposta
        on neg.imovel.id equals prop.imovel_id
    join imo in san_imovel
        on neg.imovel_id = imo.imovel_id
    where neg.credenciadacaptadora_id == null && 
        neg.credenciadavendedora_id == null &&
        prop.statusproposta_id == 2
    select new {
        ImovelID = neg.imovel_id,
        NegocioID = neg.negocio_id,
        Imo_CredenciadaID = imo.credenciada_id,
        PropostaID = prop.proposta_id
        Prop_CredenciadaID = prop.credenciada_id
    };
    

    This will create an IQueryable of anonymous objects with the listed properties above.

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

Sidebar

Related Questions

How can you write this query using a lambda expression or LINQ: SELECT *
Ho to do this? What query can be written by using select statement where
Can this MS-Access query be improved? i.e. the SELECT TOP 1 col FROM Table2
Can anyone explain why this query returns an empty result. SELECT * FROM (`bookmarks`)
I want DBSession.query(Article).group_by(Article.created.month).all() But this query can't using How do I do this using
Sample data: I can flatten out parent-child relationship using this query.... Any help... Thanks
I can't seem to get my query to stop using filesort. This is my
I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
I have to select specific column from my DataTable using linq I am using
This is my oracle query select 0 subcatg_cd, 'all' subcatg_name from dual union select

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.