9 changed files with 90 additions and 21 deletions
@ -0,0 +1,11 @@ |
|||||
|
using Volo.Abp.Data; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Notifications.EntityFrameworkCore; |
||||
|
|
||||
|
[IgnoreMultiTenancy] |
||||
|
[ConnectionStringName(AbpNotificationsDbProperties.ConnectionStringName)] |
||||
|
public interface INotificationsDefinitionDbContext : IEfCoreDbContext |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Volo.Abp.Data; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Notifications.EntityFrameworkCore; |
||||
|
|
||||
|
[ConnectionStringName(AbpNotificationsDbProperties.ConnectionStringName)] |
||||
|
public class NotificationsDefinitionDbContext : AbpDbContext<NotificationsDefinitionDbContext>, INotificationsDefinitionDbContext |
||||
|
{ |
||||
|
public NotificationsDefinitionDbContext(DbContextOptions<NotificationsDefinitionDbContext> options) |
||||
|
: base(options) |
||||
|
{ |
||||
|
} |
||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
modelBuilder.SetMultiTenancySide(MultiTenancySides.Host); |
||||
|
|
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
|
||||
|
modelBuilder.ConfigureNotificationsDefinition(); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue