Asp.Net MVC 5 – Scaffolding Enhancements
Scaffolding Enhancements
Scaffolding is a feature through which we can generate code automatically using some predefined templates. Asp.Net MVC has built in scaffolding support and feature has been enhanced in MVC 5 by introduction of New Scaffold Menu item.
Let’s try to generate a controller for an existing Model class
public class PersonModel
{
[Key]
public int PersonId { get; set; }
public string PersonName { get; set; }
public int PersonAge { get; set; }
}