Created
October 28, 2009 08:49
-
-
Save SaraJo/220359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using Transportation.ViewModels; | |
using Transportation.Models; | |
namespace Transportation.Controllers | |
{ | |
[HandleError] | |
public class HomeController : Controller | |
{ | |
public ActionResult ListVehicles() | |
{ | |
List<Car> cars = new List<Car> | |
{new Car{Make = "Honda", Model="Accord"}, | |
new Car{Make = "Acura", Model="Integra"}}; | |
Train train = new Train { Line = "NorthEast Corridor", Schedule = "Monday at 8" }; | |
TransportationViewModel t = new TransportationViewModel | |
{ | |
Cars = cars, | |
Train = train | |
}; | |
return View(t); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment