Hey, a quick tip for those dealing with .NET Core on Mac or Linux, even on Windows with Visual Studio code.

The following snipped will help you generate the entire database as models for you to use.

  1. In your project or in the machine, make sure you have dotnet ef installed
  2. Open a Terminal/Console
  3. Navigate to your project root path
  4. From there type the following

dotnet ef dbcontext scaffold “Server={YOUR AMAZING SERVER PATH};Database={THEGREATESDATABASENAME};User Id={THEPOWERFULUSER};Password={THENASAPASSWORD}” Microsoft.EntityFrameworkCore.SqlServer -o Models -f

The parts

And that’s it, everything you need to update your data models from the database, just run this.