Hello everyone Please help me, I have added a new field in our model, Now I want to run our API project so it updates automatic fields in our database. But in my case no updated fields in our database. This is my code
public static class MigrationsConfiguration { public static IApplicationBuilder DbMigrations(this IApplicationBuilder app) { using var scope = app.ApplicationServices.CreateScope(); var logger = scope.ServiceProvider.GetRequiredService<ILogger<MyFile>>(); var db = scope.ServiceProvider.GetRequiredService<dbcontext>();
logger.LogInformation("Starting migrations");
db.Database.Migrate();
logger.LogInformation("Db migrations completed");
return app; } }