IBackgroundJobsDbContext should ignore multi-tenancy.

pull/7509/head
Halil İbrahim Kalkan 5 years ago
parent 3f8bf4a2be
commit 68427bc2eb

@ -1,15 +1,17 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
{ {
[IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)] [ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)]
public class BackgroundJobsDbContext : AbpDbContext<BackgroundJobsDbContext>, IBackgroundJobsDbContext public class BackgroundJobsDbContext : AbpDbContext<BackgroundJobsDbContext>, IBackgroundJobsDbContext
{ {
public DbSet<BackgroundJobRecord> BackgroundJobs { get; set; } public DbSet<BackgroundJobRecord> BackgroundJobs { get; set; }
public BackgroundJobsDbContext(DbContextOptions<BackgroundJobsDbContext> options) public BackgroundJobsDbContext(DbContextOptions<BackgroundJobsDbContext> options)
: base(options) : base(options)
{ {
@ -22,4 +24,4 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
builder.ConfigureBackgroundJobs(); builder.ConfigureBackgroundJobs();
} }
} }
} }

@ -1,12 +1,14 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
{ {
[IgnoreMultiTenancy]
[ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)] [ConnectionStringName(BackgroundJobsDbProperties.ConnectionStringName)]
public interface IBackgroundJobsDbContext : IEfCoreDbContext public interface IBackgroundJobsDbContext : IEfCoreDbContext
{ {
DbSet<BackgroundJobRecord> BackgroundJobs { get; } DbSet<BackgroundJobRecord> BackgroundJobs { get; }
} }
} }

Loading…
Cancel
Save