public IActionResult Helper(Guitar model) { if (ModelState.IsValid) { return View("GuitarSaved", model); } return View(model); }
public IActionResult Helper() { var model = new Guitar(); model.Brand = "Gibson"; model.Model = "Les Paul"; model.HasWhammyBar = false; return View(model); }
public IActionResult ControlFlow() { var model = new Guitar(); model.Brand = "Charvel"; model.Model = "Metal Shedder"; model.WhammyBarType = "Floyd Rose"; model.Description = "Death to all but metal"; model.Strings = new List<string> { "E", "A", "D", "G", "B", "E" }; model.HasWhammyBar = true; return View(model); }
public IActionResult Variables() { var model = new Guitar(); model.Brand = "Gibson"; model.Model = "Les Paul"; model.Description = "<blink>Very cool guitar</blink>"; model.Strings = new List<string> {"E","A","D","G","B","E" }; model.HasWhammyBar = false; return View(model); }
public IActionResult ExplicitMarkup() { var model = new Guitar { Brand="Gibson", Model="Les Paul", Strings= new List<string> { "E","A","D","G","B","E"} }; return View(model); }