A lot of my Entity classes have other classes or collection of classes as properties.
For example:
public class SomeClass
{
public int ID {get; set;}
public string SomeValue {get; set;}
public virtual ICollection<AnotherEntity> AnotherEntities {get; set;}
public virtual SingleEntity {get; set;}
}
When I scaffold SomeClass
in Visual Studio it does a great job of creating the controller and all the views for setting normal properties like SomeValue
but it doesn't add anything for making the associations between SomeClass
and AnotherEntities
/ SingleEntity
.
Is there a simple way of handling this? An addon perhaps? I have tried to search for examples but I feel I am lacking the proper terms to enter into Google. I imagine I should code some sort of popup or something but some simple examples would really make it easier.
Your advice is much appreciated.