I'm trying to move a project from using Dapper to Microsoft.EntityFrameworkCore.SqlServer.
I've created the entities and their respective mappings(configurations).
Also I'm running in my ConfigureServices method inside startup.
using var scope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope();
using var context = scope.ServiceProvider.GetRequiredService<SpannerContext>();
context.Database.EnsureCreated();
context.Database.Migrate();
But nothing is happening;
Logs shows:
info: Microsoft.EntityFrameworkCore.Migrations[20405]
No migrations were applied. The database is already up to date.
But I've added some new DbSets and also change some column types
Am I missing something?