title: How to write Subquery in Entity Framework using Linq
body: <p>Hi i want this in LINQ Entity framework.......</p>
  
  <pre><code>select Empame,EmpSalary,EmpDepartment,(select CountryName from Countries c where c.ID = Employees.EmpCountry) as Country,(select StateName from dbo.States c where c.ID = Employees.EmpState)as States from Employees
  </code></pre>
  
  <p>I tried This Its givning error enter code here</p>
  
  <pre><code>    public ActionResult Index()
      {
      var Employee = (from e in _db.Employee
      select new 
      {
      Empame = e.Empame,
      EmpSalary = e.EmpSalary,
      EmpDepartment = e.EmpDepartment,
      EmpCountry = (from c in _db.Country
      where (c.ID.ToString() == e.EmpCountry)
      select c),
      EmpState = (from s in _db.States
      where (s.ID.ToString() == e.EmpState)
      select s)});
      return View(Employee);
  }
  </code></pre>
  
  <p>Cannot implicitly convert type 'System.Linq.IQueryable' to 'string'    </p>