#1332 Move connection string names to constants for modules. done!

pull/1351/head
Fisher Joe 6 years ago
parent 4c704abc5b
commit eb0ba2ede1

@ -6,5 +6,7 @@ namespace Volo.Abp.AuditLogging
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpAuditLogging";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.AuditLogging.EntityFrameworkCore
{
[ConnectionStringName("AbpAuditLogging")]
[ConnectionStringName(AbpAuditLoggingConsts.ConnectionStringName)]
public class AbpAuditLoggingDbContext : AbpDbContext<AbpAuditLoggingDbContext>, IAuditLoggingDbContext
{
public static string TablePrefix { get; set; } = AbpAuditLoggingConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.AuditLogging.EntityFrameworkCore
{
[ConnectionStringName("AbpAuditLogging")]
[ConnectionStringName(AbpAuditLoggingConsts.ConnectionStringName)]
public interface IAuditLoggingDbContext : IEfCoreDbContext
{
DbSet<AuditLog> AuditLogs { get; set; }

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.AuditLogging.MongoDB
{
[ConnectionStringName("AbpAuditLogging")]
[ConnectionStringName(AbpAuditLoggingConsts.ConnectionStringName)]
public class AuditLoggingMongoDbContext : AbpMongoDbContext, IAuditLoggingMongoDbContext
{
public static string CollectionPrefix { get; set; } = AbpAuditLoggingConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.AuditLogging.MongoDB
{
[ConnectionStringName("AbpAuditLogging")]
[ConnectionStringName(AbpAuditLoggingConsts.ConnectionStringName)]
public interface IAuditLoggingMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<AuditLog> AuditLogs { get; }

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpBackgroundJobs";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
{
[ConnectionStringName("AbpBackgroundJobs")]
[ConnectionStringName(BackgroundJobsConsts.ConnectionStringName)]
public class BackgroundJobsDbContext : AbpDbContext<BackgroundJobsDbContext>, IBackgroundJobsDbContext
{
public static string TablePrefix { get; set; } = BackgroundJobsConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
{
[ConnectionStringName("AbpBackgroundJobs")]
[ConnectionStringName(BackgroundJobsConsts.ConnectionStringName)]
public interface IBackgroundJobsDbContext : IEfCoreDbContext
{
DbSet<BackgroundJobRecord> BackgroundJobs { get; }

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.BackgroundJobs.MongoDB
{
[ConnectionStringName("AbpBackgroundJobs")]
[ConnectionStringName(BackgroundJobsConsts.ConnectionStringName)]
public class BackgroundJobsMongoDbContext : AbpMongoDbContext, IBackgroundJobsMongoDbContext
{
public static string CollectionPrefix { get; set; } = BackgroundJobsConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.BackgroundJobs.MongoDB
{
[ConnectionStringName("AbpBackgroundJobs")]
[ConnectionStringName(BackgroundJobsConsts.ConnectionStringName)]
public interface IBackgroundJobsMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; }

@ -4,5 +4,6 @@
{
public const string DefaultDbTablePrefix = "Blg";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "Blogging";
}
}

@ -9,7 +9,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.EntityFrameworkCore
{
[ConnectionStringName("Blogging")]
[ConnectionStringName(BloggingConsts.ConnectionStringName)]
public class BloggingDbContext : AbpDbContext<BloggingDbContext>, IBloggingDbContext
{
public static string TablePrefix { get; set; } = BloggingConsts.DefaultDbTablePrefix;

@ -9,7 +9,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.EntityFrameworkCore
{
[ConnectionStringName("Blogging")]
[ConnectionStringName(BloggingConsts.ConnectionStringName)]
public interface IBloggingDbContext : IEfCoreDbContext
{
DbSet<BlogUser> Users { get; }

@ -11,7 +11,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.MongoDB
{
[ConnectionStringName("Blogging")]
[ConnectionStringName(BloggingConsts.ConnectionStringName)]
public class BloggingMongoDbContext : AbpMongoDbContext, IBloggingMongoDbContext
{
public static string CollectionPrefix { get; set; } = BloggingConsts.DefaultDbTablePrefix;

@ -8,7 +8,7 @@ using Volo.Blogging.Users;
namespace Volo.Blogging.MongoDB
{
[ConnectionStringName("Blogging")]
[ConnectionStringName(BloggingConsts.ConnectionStringName)]
public interface IBloggingMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<BlogUser> Users { get; }

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Docs";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "Docs";
}
}

@ -5,7 +5,7 @@ using Volo.Docs.Projects;
namespace Volo.Docs.EntityFrameworkCore
{
[ConnectionStringName("Docs")]
[ConnectionStringName(DocsConsts.ConnectionStringName)]
public class DocsDbContext: AbpDbContext<DocsDbContext>, IDocsDbContext
{
public static string TablePrefix { get; set; } = DocsConsts.DefaultDbTablePrefix;

@ -5,7 +5,7 @@ using Volo.Docs.Projects;
namespace Volo.Docs.EntityFrameworkCore
{
[ConnectionStringName("Docs")]
[ConnectionStringName(DocsConsts.ConnectionStringName)]
public interface IDocsDbContext : IEfCoreDbContext
{
DbSet<Project> Projects { get; set; }

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpFeatureManagement";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.FeatureManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpFeatureManagement")]
[ConnectionStringName(FeatureManagementConsts.ConnectionStringName)]
public class FeatureManagementDbContext : AbpDbContext<FeatureManagementDbContext>, IFeatureManagementDbContext
{
public static string TablePrefix { get; set; } = FeatureManagementConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.FeatureManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpFeatureManagement")]
[ConnectionStringName(FeatureManagementConsts.ConnectionStringName)]
public interface IFeatureManagementDbContext : IEfCoreDbContext
{
DbSet<FeatureValue> FeatureValues { get; set; }

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.FeatureManagement.MongoDB
{
[ConnectionStringName("AbpFeatureManagement")]
[ConnectionStringName(FeatureManagementConsts.ConnectionStringName)]
public class FeatureManagementMongoDbContext : AbpMongoDbContext, IFeatureManagementMongoDbContext
{
public static string CollectionPrefix { get; set; } = FeatureManagementConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.FeatureManagement.MongoDB
{
[ConnectionStringName("AbpFeatureManagement")]
[ConnectionStringName(FeatureManagementConsts.ConnectionStringName)]
public interface IFeatureManagementMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<FeatureValue> FeatureValues { get; }

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpIdentity";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.Identity.EntityFrameworkCore
{
[ConnectionStringName("AbpIdentity")]
[ConnectionStringName(AbpIdentityConsts.ConnectionStringName)]
public interface IIdentityDbContext : IEfCoreDbContext
{
DbSet<IdentityUser> Users { get; set; }

@ -7,7 +7,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
/// <summary>
/// Base class for the Entity Framework database context used for identity.
/// </summary>
[ConnectionStringName("AbpIdentity")]
[ConnectionStringName(AbpIdentityConsts.ConnectionStringName)]
public class IdentityDbContext : AbpDbContext<IdentityDbContext>, IIdentityDbContext
{
public static string TablePrefix { get; set; } = AbpIdentityConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.Identity.MongoDB
{
[ConnectionStringName("AbpIdentity")]
[ConnectionStringName(AbpIdentityConsts.ConnectionStringName)]
public class AbpIdentityMongoDbContext : AbpMongoDbContext, IAbpIdentityMongoDbContext
{
public static string CollectionPrefix { get; set; } = AbpIdentityConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.Identity.MongoDB
{
[ConnectionStringName("AbpIdentity")]
[ConnectionStringName(AbpIdentityConsts.ConnectionStringName)]
public interface IAbpIdentityMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<IdentityUser> Users { get; }

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "IdentityServer";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpIdentityServer";
}
}

@ -8,7 +8,7 @@ using Volo.Abp.IdentityServer.IdentityResources;
namespace Volo.Abp.IdentityServer.EntityFrameworkCore
{
[ConnectionStringName("AbpIdentityServer")]
[ConnectionStringName(AbpIdentityServerConsts.ConnectionStringName)]
public interface IIdentityServerDbContext : IEfCoreDbContext
{
DbSet<ApiResource> ApiResources { get; set; }

@ -8,7 +8,7 @@ using Volo.Abp.IdentityServer.IdentityResources;
namespace Volo.Abp.IdentityServer.EntityFrameworkCore
{
[ConnectionStringName("AbpIdentityServer")]
[ConnectionStringName(AbpIdentityServerConsts.ConnectionStringName)]
public class IdentityServerDbContext : AbpDbContext<IdentityServerDbContext>, IIdentityServerDbContext
{
public static string TablePrefix { get; set; } = AbpIdentityServerConsts.DefaultDbTablePrefix;

@ -8,7 +8,7 @@ using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResou
namespace Volo.Abp.IdentityServer.MongoDB
{
[ConnectionStringName("AbpIdentityServer")]
[ConnectionStringName(AbpIdentityServerConsts.ConnectionStringName)]
public class AbpIdentityServerMongoDbContext : AbpMongoDbContext, IAbpIdentityServerMongoDbContext
{
public static string CollectionPrefix { get; set; } = AbpIdentityServerConsts.DefaultDbTablePrefix;

@ -8,7 +8,7 @@ using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
namespace Volo.Abp.IdentityServer.MongoDB
{
[ConnectionStringName("AbpIdentityServer")]
[ConnectionStringName(AbpIdentityServerConsts.ConnectionStringName)]
public interface IAbpIdentityServerMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<ApiResource> ApiResources { get; }

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpPermissionManagement";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.PermissionManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpPermissionManagement")]
[ConnectionStringName(AbpPermissionManagementConsts.ConnectionStringName)]
public interface IPermissionManagementDbContext : IEfCoreDbContext
{
DbSet<PermissionGrant> PermissionGrants { get; set; }

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.PermissionManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpPermissionManagement")]
[ConnectionStringName(AbpPermissionManagementConsts.ConnectionStringName)]
public class PermissionManagementDbContext : AbpDbContext<PermissionManagementDbContext>, IPermissionManagementDbContext
{
public static string TablePrefix { get; set; } = AbpPermissionManagementConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.PermissionManagement.MongoDB
{
[ConnectionStringName("AbpPermissionManagement")]
[ConnectionStringName(AbpPermissionManagementConsts.ConnectionStringName)]
public interface IPermissionManagementMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<PermissionGrant> PermissionGrants { get; }

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.PermissionManagement.MongoDB
{
[ConnectionStringName("AbpPermissionManagement")]
[ConnectionStringName(AbpPermissionManagementConsts.ConnectionStringName)]
public class PermissionManagementMongoDbContext : AbpMongoDbContext, IPermissionManagementMongoDbContext
{
public static string CollectionPrefix { get; set; } = AbpPermissionManagementConsts.DefaultDbTablePrefix;

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpSettingManagement";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.SettingManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpSettingManagement")]
[ConnectionStringName(AbpSettingManagementConsts.ConnectionStringName)]
public interface ISettingManagementDbContext : IEfCoreDbContext
{
DbSet<Setting> Settings { get; set; }

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.SettingManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpSettingManagement")]
[ConnectionStringName(AbpSettingManagementConsts.ConnectionStringName)]
public class SettingManagementDbContext : AbpDbContext<SettingManagementDbContext>, ISettingManagementDbContext
{
public static string TablePrefix { get; set; } = AbpSettingManagementConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.SettingManagement.MongoDB
{
[ConnectionStringName("AbpSettingManagement")]
[ConnectionStringName(AbpSettingManagementConsts.ConnectionStringName)]
public interface ISettingManagementMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<Setting> Settings { get; }

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.SettingManagement.MongoDB
{
[ConnectionStringName("AbpSettingManagement")]
[ConnectionStringName(AbpSettingManagementConsts.ConnectionStringName)]
public class SettingManagementMongoDbContext : AbpMongoDbContext, ISettingManagementMongoDbContext
{
public static string CollectionPrefix { get; set; } = AbpSettingManagementConsts.DefaultDbTablePrefix;

@ -5,5 +5,7 @@
public const string DefaultDbTablePrefix = "Abp";
public const string DefaultDbSchema = null;
public const string ConnectionStringName = "AbpTenantManagement";
}
}

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.TenantManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpTenantManagement")]
[ConnectionStringName(AbpTenantManagementConsts.ConnectionStringName)]
public interface ITenantManagementDbContext : IEfCoreDbContext
{
DbSet<Tenant> Tenants { get; set; }

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Volo.Abp.TenantManagement.EntityFrameworkCore
{
[ConnectionStringName("AbpTenantManagement")]
[ConnectionStringName(AbpTenantManagementConsts.ConnectionStringName)]
public class TenantManagementDbContext : AbpDbContext<TenantManagementDbContext>, ITenantManagementDbContext
{
public static string TablePrefix { get; set; } = AbpTenantManagementConsts.DefaultDbTablePrefix;

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.TenantManagement.MongoDb
{
[ConnectionStringName("AbpTenantManagement")]
[ConnectionStringName(AbpTenantManagementConsts.ConnectionStringName)]
public interface ITenantManagementMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<Tenant> Tenants { get; }

@ -4,7 +4,7 @@ using Volo.Abp.MongoDB;
namespace Volo.Abp.TenantManagement.MongoDb
{
[ConnectionStringName("AbpTenantManagement")]
[ConnectionStringName(AbpTenantManagementConsts.ConnectionStringName)]
public class TenantManagementMongoDbContext : AbpMongoDbContext, ITenantManagementMongoDbContext
{
public static string CollectionPrefix { get; set; } = AbpTenantManagementConsts.DefaultDbTablePrefix;

Loading…
Cancel
Save