Is it possible to scaffold more then one class in MVC 5? I have 2 classes I'd like to been able to edit/create on one page. Do I have to scaffold separately each class and then connect somehow their views or is there a better way? Let say I have classes Office and Contacts and want Office data and Contacts for that office to be editable on one page. Also I do code first approach and not sure how to connect them with foreign key? One office can have many contacts. I have classes as below thanks
public class Office
{
[Key]
public int Id { get; set; }
public int ContactId { get; set; }
public string OfficeName { get; set; }
}
public class Contact
{
[Key]
public int Id { get; set; }
public int OfficeId { get; set; }
public string Name { get; set; }
public string Phone { get; set; }
}