コード例 #1
0
 public ActionResult ComplexType()
 {
     var employee = new Employee
     {
         Id = 1,
         FirstName = "Scott",
         LastName = "Allen",
         HireDate = new DateTime(2002, 10, 1)
     };
     return View(employee);
 }
コード例 #2
0
 public ActionResult Custom(Employee employee)
 {
     ViewBag.ShowResults = true;
     return View(employee);
 }
コード例 #3
0
 public ActionResult Custom()
 {
     var employee = new Employee() {FirstName = "Scott", LastName="Allen", HireDate = DateTime.Now};
     return View(employee);
 }
コード例 #4
0
 public ActionResult ComplexType(Employee employee)
 {
     ViewBag.ShowResults = true;
     return View(employee);
 }
コード例 #5
0
 public IHttpActionResult PostComplex(Employee employee)
 {
     return Ok(employee);
 }