I created an EF4.1 code-first model (may or may not be important), and I\'m trying to get default values for my Create scaffold template. My model looks like:
Model
class Person { public Person() { Age = 18; } public int Age { get; set; } }
Controller
public ActionResult Create() { return View(new Person()); }
It works fine.