visual studio entity framework core code first generate database code example
Example: scaffold-dbcontext sql server
PM> Scaffold-DbContext "Server=.\SQLExpress;Database=SchoolDB;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models