title: Error trying to scaffold Controller in ASP.NET Core 6 Web API - Visual Studio 2022
body: <p>I have created a new ASP.NET Core 6 Web API project and I'm using an existing MYSQL database.
  I managed to scaffold models and context from the database without problems.</p>
  <p>But when i try to scaffold controller, either when using the Add -&gt; Controller -&gt; API -&gt; API Controller with actions, using Entity Framework (in solution explorer) or using dotnet-aspnet-codegenerator controller command in Package Manager Console i get the following error:
  <a href="https://i.stack.imgur.com/JrQ2y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JrQ2y.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/q0lBJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q0lBJ.png" alt="enter image description here" /></a></p>
  <p>I have googled around for solutions but can't seem to find any.</p>
  <p>I'm new to C#/Visual Studio/.NET/EntityFramework (I'm used to using node.js) so any help/suggestions are appreciated.</p>