I am creating the model classes using the Entity Framework DataBase First with the following command in the console:
Scaffold-DbContext 'Server=DESKTOP-IODH4BJ\OPUSDB;Database=OPUS EXAMPLE;Trusted_Connection=True' Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
With this command it creates all the database tables and I only want some specific tables.
Could you help me with the correct command to create the Models of specific table classes .
Also to ask you the following. Can the class models of the views created in sqlserver be created with this command?
To create only the Models of certain Tables of the database, you must indicate it through the -Tables option :
If you want to consult the rest of the command options
Scaffold-DbContext
, I advise you to read this article Entity Framework Core Database First in .NET MVC applications