| | | 1 | | using Elsa.Persistence.EFCore.Abstractions; |
| | | 2 | | using Elsa.Persistence.EFCore.Extensions; |
| | | 3 | | using Elsa.Persistence.EFCore.Modules.Alterations; |
| | | 4 | | using Elsa.Persistence.EFCore.Modules.Identity; |
| | | 5 | | using Elsa.Persistence.EFCore.Modules.Labels; |
| | | 6 | | using Elsa.Persistence.EFCore.Modules.Management; |
| | | 7 | | using Elsa.Persistence.EFCore.Modules.Runtime; |
| | | 8 | | using Elsa.Persistence.EFCore.Modules.Tenants; |
| | | 9 | | using Elsa.Persistence.EFCore.PostgreSql.Handlers; |
| | | 10 | | using JetBrains.Annotations; |
| | | 11 | | using Microsoft.EntityFrameworkCore; |
| | | 12 | | using Microsoft.Extensions.DependencyInjection; |
| | | 13 | | |
| | | 14 | | #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member |
| | | 15 | | |
| | | 16 | | namespace Elsa.Persistence.EFCore.PostgreSql; |
| | | 17 | | |
| | | 18 | | [UsedImplicitly] |
| | | 19 | | public class IdentityDbContextFactory : PostgreSqlDesignTimeDbContextFactory<IdentityElsaDbContext>; |
| | | 20 | | |
| | | 21 | | [UsedImplicitly] |
| | | 22 | | public class ManagementDbContextFactory : PostgreSqlDesignTimeDbContextFactory<ManagementElsaDbContext>; |
| | | 23 | | |
| | | 24 | | [UsedImplicitly] |
| | | 25 | | public class RuntimeDbContextFactory : PostgreSqlDesignTimeDbContextFactory<RuntimeElsaDbContext>; |
| | | 26 | | |
| | | 27 | | [UsedImplicitly] |
| | | 28 | | public class LabelsDbContextFactory : PostgreSqlDesignTimeDbContextFactory<LabelsElsaDbContext>; |
| | | 29 | | |
| | | 30 | | [UsedImplicitly] |
| | | 31 | | public class AlterationsDbContextFactories : PostgreSqlDesignTimeDbContextFactory<AlterationsElsaDbContext>; |
| | | 32 | | |
| | | 33 | | [UsedImplicitly] |
| | | 34 | | public class TenantsDbContextFactories : PostgreSqlDesignTimeDbContextFactory<TenantsElsaDbContext>; |
| | | 35 | | |
| | | 36 | | public class PostgreSqlDesignTimeDbContextFactory<TDbContext> : DesignTimeDbContextFactoryBase<TDbContext> where TDbCont |
| | | 37 | | { |
| | | 38 | | protected override void ConfigureServices(IServiceCollection services) |
| | | 39 | | { |
| | 0 | 40 | | services.AddScoped<IEntityModelCreatingHandler, SetupForPostgreSql>(); |
| | 0 | 41 | | } |
| | | 42 | | |
| | | 43 | | protected override void ConfigureBuilder(DbContextOptionsBuilder<TDbContext> builder, string connectionString) |
| | | 44 | | { |
| | 0 | 45 | | builder.UseElsaPostgreSql(GetType().Assembly, connectionString); |
| | 0 | 46 | | } |
| | | 47 | | } |