When trying to scaffold a controller I get the following error:
"There was an error running the selected code generator: 'The entity type 'Company.Models.Office' requires a primary key to be defined at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.b_6-0()"
I am new to MVC Core but my understanding is that a primary key is defined by default as ID or classnameID. I have also tried adding the [Key] attribute and renaming the primary key to OfficeID. I have gone through a similar process with another class and did not run into this problem
public class Office
{
public int ID;
public string Name;
public int SiteID;
}