If you haven't created migrations, there are 2 options
1.create the database and tables from application Main:
var context = services.GetRequiredService<YourRepository>();
context.Database.EnsureCreated();
2.create the tables if the database already exists:
var context = services.GetRequiredService<YourRepository>();
context.Database.EnsureCreated();
RelationalDatabaseCreator databaseCreator =
(RelationalDatabaseCreator)context.Database.GetService<IDatabaseCreator>();
databaseCreator.CreateTables();
Thanks to Bubi's answer