title: Return inner join in EF
body: <p>I'm trying to learn ASP.NET MVC, so I did as test project this where I want to display in Index a list of cities and when you click on city to see the properties in those cities.
  <img src="https://i.stack.imgur.com/voo0h.jpg" alt="my edmx"></p>
  
  <p>Then I did some changes in global.asax in order to come up with nice URLs:</p>
  
  <pre><code> public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapRoute(
            "Home-Browse",
            "Accommodation-{city}",
            new { controller = "Home", action = "Browse", city = "" });
  
          routes.MapRoute(
              "Default", // Route name
              "{controller}/{action}/{id}", // URL with parameters
              new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
          );
  
      }
  </code></pre>
  
  <p>So now after I see the list of cities and I click one I get a URL like: <code>/Accommodation-Amsterdam</code>
  My problem is that I don't know how to do the inner join in order to tell the controller to show me the properties in the area selected. (I told you I'm just learning this)</p>
  
  <p>My home controller:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using accomm2.Models;
  
  namespace accomm2.Controllers
  {
      [HandleError]
      public class HomeController : Controller
      {
          dataEntities _db;
  
          public HomeController()
          {
              _db = new dataEntities();
          }
  
  
          public ActionResult Index()
          {
              ViewData.Model = _db.Cities.ToList();
  
              return View();
          }
  
          public ActionResult Browse()
          {
            //ViewData.Model = _db.Properties.ToList();
  
  
              var properties = from c in _db.Cities
                               from p in c.Properties
                               where c.CityId == CityId
                          select c;
  
  
              return View(properties.ToList()); 
  
          }
      }
  }
  </code></pre>
  
  <p>Could somebody help me with my Linq query or at least direct me to the right way?</p>