I'm trying to create a MVC app (which is my first one)
I have the main class:
public class Dataset
{
public string Uuid {get; set;}
public virtual Class2 Field1 {get; set;}
public virtual Class2 Field2 {get; set;}
public virtual Class2 Field3 {get; set;}
public int someotherfields {get; set;}
}
Class2:
public partial class Class2
{
public int ID {get; set;}
public string someText {get; set;}
public bool visible {get; set;}
}
When I'm scaffolding the Dataset class all fields are created but not the fields of type Class2. The migrations are creating not only the tables for the Dataset Class but also for Class2.
How can I make the fields of type Class2 be usable in my scaffolded views?
Or am I doing I completely wrong?