public ActionResult Collection() { var department = new Department(); department.Name = "Engineering"; department.Employees = new List<Employee> { new Employee() { FirstName="Scott", LastName = "Allen", HireDate=DateTime.Now}, new Employee() { FirstName="Alan", LastName = "Scott", HireDate=DateTime.Now} }; return View(department); }
public ActionResult Collection(Department department) { ViewBag.ShowResults = true; return View(department); }
public IHttpActionResult PostMoreComplex(Department department) { return Ok(department); }