Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Abp prefix to DbProperties classes #13400

Merged
merged 2 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Volo.Abp.BackgroundJobs;

public static class BackgroundJobsDbProperties
public static class AbpBackgroundJobsDbProperties
{
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore;

[IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public class BackgroundJobsDbContext : AbpDbContext<BackgroundJobsDbContext>, IBackgroundJobsDbContext
{
public DbSet<BackgroundJobRecord> BackgroundJobs { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void ConfigureBackgroundJobs(

builder.Entity<BackgroundJobRecord>(b =>
{
b.ToTable(BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs", BackgroundJobsDbProperties.DbSchema);
b.ToTable(AbpBackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs", AbpBackgroundJobsDbProperties.DbSchema);

b.ConfigureByConvention();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore;

[IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public interface IBackgroundJobsDbContext : IEfCoreDbContext
{
DbSet<BackgroundJobRecord> BackgroundJobs { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Volo.Abp.BackgroundJobs.MongoDB;

[IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public class BackgroundJobsMongoDbContext : AbpMongoDbContext, IBackgroundJobsMongoDbContext
{
public IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static void ConfigureBackgroundJobs(

builder.Entity<BackgroundJobRecord>(b =>
{
b.CollectionName = BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs";
b.CollectionName = AbpBackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs";
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Volo.Abp.BackgroundJobs.MongoDB;

[IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBackgroundJobsDbProperties.ConnectionStringName)]
public interface IBackgroundJobsMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<BackgroundJobRecord> BackgroundJobs { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Volo.Abp.BlobStoring.Database;

public static class BlobStoringDatabaseDbProperties
public static class AbpBlobStoringDatabaseDbProperties
{
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore;

[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public class BlobStoringDbContext : AbpDbContext<BlobStoringDbContext>, IBlobStoringDbContext
{
public DbSet<DatabaseBlobContainer> BlobContainers { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void ConfigureBlobStoring(

builder.Entity<DatabaseBlobContainer>(b =>
{
b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers", BlobStoringDatabaseDbProperties.DbSchema);
b.ToTable(AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers", AbpBlobStoringDatabaseDbProperties.DbSchema);

b.ConfigureByConvention();

Expand All @@ -27,7 +27,7 @@ public static void ConfigureBlobStoring(

builder.Entity<DatabaseBlob>(b =>
{
b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs", BlobStoringDatabaseDbProperties.DbSchema);
b.ToTable(AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs", AbpBlobStoringDatabaseDbProperties.DbSchema);

b.ConfigureByConvention();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore;

[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public interface IBlobStoringDbContext : IEfCoreDbContext
{
DbSet<DatabaseBlobContainer> BlobContainers { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Volo.Abp.BlobStoring.Database.MongoDB;

[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public class BlobStoringMongoDbContext : AbpMongoDbContext, IBlobStoringMongoDbContext
{
public IMongoCollection<DatabaseBlobContainer> BlobContainers => Collection<DatabaseBlobContainer>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public static void ConfigureBlobStoring(

builder.Entity<DatabaseBlobContainer>(b =>
{
b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers";
b.CollectionName = AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers";
});

builder.Entity<DatabaseBlob>(b =>
{
b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs";
b.CollectionName = AbpBlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs";
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Volo.Abp.BlobStoring.Database.MongoDB;

[ConnectionStringName(BlobStoringDatabaseDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBlobStoringDatabaseDbProperties.ConnectionStringName)]
public interface IBlobStoringMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<DatabaseBlobContainer> BlobContainers { get; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Volo.Blogging
{
public static class BloggingDbProperties
public static class AbpBloggingDbProperties
{
/// <summary>
/// Default value: "Blg".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Volo.Blogging.EntityFrameworkCore
{
[IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public class BloggingDbContext : AbpDbContext<BloggingDbContext>, IBloggingDbContext
{
public DbSet<BlogUser> Users { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static void ConfigureBlogging(

builder.Entity<BlogUser>(b =>
{
b.ToTable(BloggingDbProperties.DbTablePrefix + "Users", BloggingDbProperties.DbSchema);
b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Users", AbpBloggingDbProperties.DbSchema);

b.ConfigureByConvention();
b.ConfigureAbpUser();
Expand All @@ -35,7 +35,7 @@ public static void ConfigureBlogging(

builder.Entity<Blog>(b =>
{
b.ToTable(BloggingDbProperties.DbTablePrefix + "Blogs", BloggingDbProperties.DbSchema);
b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Blogs", AbpBloggingDbProperties.DbSchema);

b.ConfigureByConvention();

Expand All @@ -48,7 +48,7 @@ public static void ConfigureBlogging(

builder.Entity<Post>(b =>
{
b.ToTable(BloggingDbProperties.DbTablePrefix + "Posts", BloggingDbProperties.DbSchema);
b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Posts", AbpBloggingDbProperties.DbSchema);

b.ConfigureByConvention();

Expand All @@ -68,7 +68,7 @@ public static void ConfigureBlogging(

builder.Entity<Comment>(b =>
{
b.ToTable(BloggingDbProperties.DbTablePrefix + "Comments", BloggingDbProperties.DbSchema);
b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Comments", AbpBloggingDbProperties.DbSchema);

b.ConfigureByConvention();

Expand All @@ -84,7 +84,7 @@ public static void ConfigureBlogging(

builder.Entity<Tag>(b =>
{
b.ToTable(BloggingDbProperties.DbTablePrefix + "Tags", BloggingDbProperties.DbSchema);
b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "Tags", AbpBloggingDbProperties.DbSchema);

b.ConfigureByConvention();

Expand All @@ -99,7 +99,7 @@ public static void ConfigureBlogging(

builder.Entity<PostTag>(b =>
{
b.ToTable(BloggingDbProperties.DbTablePrefix + "PostTags", BloggingDbProperties.DbSchema);
b.ToTable(AbpBloggingDbProperties.DbTablePrefix + "PostTags", AbpBloggingDbProperties.DbSchema);

b.ConfigureByConvention();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Volo.Blogging.EntityFrameworkCore
{
[IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public interface IBloggingDbContext : IEfCoreDbContext
{
DbSet<BlogUser> Users { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Volo.Blogging.MongoDB
{
[IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public class BloggingMongoDbContext : AbpMongoDbContext, IBloggingMongoDbContext
{
public IMongoCollection<BlogUser> Users => Collection<BlogUser>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ public static void ConfigureBlogging(

builder.Entity<BlogUser>(b =>
{
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Users";
b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Users";
});

builder.Entity<Blog>(b =>
{
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Blogs";
b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Blogs";
});

builder.Entity<Post>(b =>
{
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Posts";
b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Posts";
});

builder.Entity<Tagging.Tag>(b =>
{
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Tags";
b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Tags";
});

builder.Entity<Comment>(b =>
{
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Comments";
b.CollectionName = AbpBloggingDbProperties.DbTablePrefix + "Comments";
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Volo.Blogging.MongoDB
{
[IgnoreMultiTenancy]
[ConnectionStringName(BloggingDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpBloggingDbProperties.ConnectionStringName)]
public interface IBloggingMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<BlogUser> Users { get; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Volo.CmsKit;

public static class CmsKitDbProperties
public static class AbpCmsKitDbProperties
{
public static string DbTablePrefix { get; set; } = "Cms";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Volo.CmsKit.EntityFrameworkCore;

[ConnectionStringName(CmsKitDbProperties.ConnectionStringName)]
[ConnectionStringName(AbpCmsKitDbProperties.ConnectionStringName)]
public class CmsKitDbContext : AbpDbContext<CmsKitDbContext>, ICmsKitDbContext
{
public DbSet<Comment> Comments { get; set; }
Expand Down
Loading