sync full source from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 10:55:09 +00:00
parent 874796c860
commit 405abdfe69
714 changed files with 70352 additions and 234 deletions
@@ -0,0 +1,27 @@
namespace MyOffice.Migrations.Postgres;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using MyOffice.DbContext;
using MyOffice.Shared;
public class AppDbContextFactoryPostgres : IDesignTimeDbContextFactory<AppDbContext>
{
public AppDbContext CreateDbContext(string[]? args)
{
var builder = new DbContextOptionsBuilder<AppDbContext>();
var sharedConfiguration = SharedConfiguration.Build();
var connectionString =
args?.FirstOrDefault()
?? sharedConfiguration.GetConnectionString("npgsql");
builder.UseNpgsql(connectionString, b => b.MigrationsAssembly("MyOffice.Migrations.Postgres"));
var db = new AppDbContext(AppDbContextProvidersEnum.npgsql, builder.Options);
db.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
return db;
}
}