ARCH-2: swap EF provider to Npgsql, drop SqlServer migrations + conn strings
- Microsoft.EntityFrameworkCore.SqlServer -> Npgsql.EntityFrameworkCore.PostgreSQL 10.0.2 - UseSqlServer -> UseNpgsql (Aspire-injected gerbilmanager connection) - Removed hardcoded sa connection strings from appsettings*.json - Deleted SqlServer-flavored initial migration (fresh Npgsql one follows; no prod data) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
builder.Services.AddDbContext<ApplicationContext>(opts => opts.UseSqlServer(builder.Configuration.GetConnectionString("sqlConnection")));
|
||||
builder.Services.AddDbContext<ApplicationContext>(opts => opts.UseNpgsql(builder.Configuration.GetConnectionString("gerbilmanager")));
|
||||
builder.Services.AddScoped<UnitOfWork>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
Reference in New Issue
Block a user