title: ASP.NET MVC controller join two tables: "An anonymous type cannot have multiple properties with the same name"
body: <p>I have the following code to join two tables in an ASP.NET MVC controller but I also want to display employee's supervisor name from the same table and same filed.</p>
  
  <p>But I get an error:</p>
  
  <blockquote>
    <p>An anonymous type cannot have multiple properties with the same name</p>
  </blockquote>
  
  <p>Here is my code </p>
  
  <pre><code>public IHttpActionResult GetEmployees()
  {
      var query = (from n in db.Employees
                   join c in db.tblCities on n.ProjectID equals c.CityID
                   into nc
                   from c in nc.DefaultIfEmpty()
  
                   join manager in db.Employees on n.ManagerName equals manager.Name
                   into pc
                   from managerin pc.DefaultIfEmpty()
  
                   select new
                           {
                               n.Name,
                               manager.Name,
                               n.Email,
                               c.CityName
                           });
  
      var employees = query.ToList();
  
      return Ok(employees);
  }
  </code></pre>
  
  <p>What is the workaround to accomplish my goal?</p>