Rename WebApi project to Vegasco.Server.Api
All checks were successful
continuous-integration/drone/push Build is passing

And update all references including comments etc.
This commit is contained in:
2025-06-12 18:22:37 +02:00
parent 9d71c86474
commit a1999bfe41
71 changed files with 177 additions and 224 deletions

View File

@@ -0,0 +1,18 @@
using Microsoft.EntityFrameworkCore;
namespace Vegasco.Server.Api.Persistence;
public class ApplyMigrationsService(ILogger<ApplyMigrationsService> logger, IServiceScopeFactory scopeFactory)
: IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
logger.LogInformation("Starting migrations");
using IServiceScope scope = scopeFactory.CreateScope();
await using var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
await dbContext.Database.MigrateAsync(cancellationToken);
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}