Example error; I try to Scaffold Controller Region -Repository
Region class
public class Region
{
public int RegionId { get; set; }
public string RegionCode { get; set; }
public string ApiUrl { get; set; }
public Universe[] Universes { get; set; }
}
The error repeats essentially for each file it tries to generate (the views, mostly).
I'm not sure what information to include other than this, because I have no clue what causes it. I've tried searching for a solution, but most solutions seems unrelated to my particular issue.
What I will suggest to you is to replace the Array
by a List
or better an generic interface ICollection
. And then try again. Working with array you need to intialize it in the constructor.
public class Region
{
public int RegionId { get; set; }
public string RegionCode { get; set; }
public string ApiUrl { get; set; }
public ICollection<Universe> Universes { get; set; }
}