Added endpoints for specific verspakketten, added sorting for All Verspakketten endpoint
This commit is contained in:
20
Lutra/Lutra.Infrastructure/LutraDbContextFactory.cs
Normal file
20
Lutra/Lutra.Infrastructure/LutraDbContextFactory.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
|
||||
namespace Lutra.Infrastructure.Sql;
|
||||
|
||||
/// <summary>
|
||||
/// Design-time factory used by EF Core tools (dotnet ef migrations) so that
|
||||
/// no startup project or live database connection is required when running migrations.
|
||||
/// </summary>
|
||||
internal sealed class LutraDbContextFactory : IDesignTimeDbContextFactory<LutraDbContext>
|
||||
{
|
||||
public LutraDbContext CreateDbContext(string[] args)
|
||||
{
|
||||
var options = new DbContextOptionsBuilder<LutraDbContext>()
|
||||
.UseNpgsql("Host=localhost;Database=lutra;Username=postgres;Password=postgres")
|
||||
.Options;
|
||||
|
||||
return new LutraDbContext(options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user