static void Main(string[] args) { //Create a Banjo! var myFirstBanjo = new Banjo("it's my first!", 4, 67, Banjo.BanjoState.Used); //Oh no! The above line didn't work because I can't access BanjoState! //I can't used the enum to pass in the value because it's private to the //Banjo class. THAT is why the error was visible in the constructor. //Visual Studio knew this would happen! }
public Banjo Add([FromBody] Banjo banjo) { return(banjo); }