hi
You can get the dbcontext
migrate
and seed
the data in OnPreApplicationInitializationAsync
method of your module.
public async override Task OnPreApplicationInitializationAsync(ApplicationInitializationContext context)
{
using var uow = context.ServiceProvider.GetRequiredService<IUnitOfWorkManager>().Begin();
{
var dbContext = await context.ServiceProvider.GetRequiredService<IDbContextProvider<ServerDbContext>>().GetDbContextAsync();
if ((await dbContext.Database.GetPendingMigrationsAsync()).Any())
{
await dbContext.Database.MigrateAsync();
}
await uow.CompleteAsync();
}
await context.ServiceProvider
.GetRequiredService<IDataSeeder>()
.SeedAsync();
}
hi
Have you added the JWT Bearer
authentication to your website?
Please share your start-up module code and the logs of this 401 request.
Thanks.
hi
This seems to be not related to the abp framework.
We don't have much experience.
hi
how can i call a controller on page load itself with any type of parameter.
You can add a from
to your page and submit the form
via JS code.
Can you push your code to a Github repository?
hi
How can I reproduce this?
hi
What is the submit URL? is it HTTPS
?