title: Entity framework linq inner join return object if condition is true
body: <pre><code>public UserMaster Login(UserMaster userMaster, string otp)
      {
  
          return (from um in _context.UserMasters.Where(u =&gt; u.UserName == userMaster.UserName &amp;&amp; u.Password == userMaster.Password &amp;&amp; u.IsDisplay == true &amp;&amp; u.IsActive == true)
                  join pin in _context.UserPins.Where(p =&gt; p.Pin == otp) on um.UserId equals pin.UserId
                  select new { um }).SingleOrDefault();
     }
  </code></pre>
  
  <p>I am trying to return a object of User if the Condition are met, i.e if the user has correct pass and username as well as correct otp from a different table. I only need/require to return the User Master Obj.</p>
  
  <p>Giving following error</p>
  
  <p><img src="https://i.stack.imgur.com/vhsVz.png" alt="enter image description here"></p>