title: ASP.NET MVC - updating foreign keys
body: <p>I am just starting to investigate ASP.NET MVC, and I am using the latest beta (ie. 4). I'm after the correct approach to what is a fairly CRUD scenario. My main table (Task) looks something like this - </p>
  
  <p>TaskID (int)
  EmployeeID (int)
  ProjectID (int)
  DeptID (int)
  Comment (varchar)
  Date (datetime)
  Hours (float)</p>
  
  <p>TaskID is the primary key. The other three IDs are all foreign keys into reference tables. </p>
  
  <p>Following various tutorials, I created an object model (.edmx) using Entity Framework. I then autogenerated the controller using "Add... Controller" and selecting the "Controller with read/write..." template. </p>
  
  <p>All worked well. However, obviously I want the three foreign key columns to display lookup values from the reference tables, rather than the ID. I'm really not sure what the "best practice" method for achieving this is. A few options occur to me -</p>
  
  <ol>
  <li>Create a view in SQL Server</li>
  <li>Create a view in EF (not sure how this is done)</li>
  <li>Look up the reference values on the fly using LINQ in the controllers</li>
  </ol>
  
  <p>Perhaps there are other ways. I would like to hear from experienced MVC progs regarding "best practice" in this scenario. </p>