Browse Source

CmsKit - Temporary solution for Content deletion

pull/6926/head
enisn 5 years ago
parent
commit
6079da5290
  1. 6
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs

6
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs

@ -100,9 +100,11 @@ namespace Volo.CmsKit.EntityFrameworkCore
builder.Entity<Content>(b =>
{
b.ToTable(options.TablePrefix + "Contents", options.Schema);
b.ConfigureByConvention();
b.HasQueryFilter(x => !x.IsDeleted); // TODO: Find out why default filter doesn't work.
b.Property(x => x.EntityType).IsRequired().HasMaxLength(ContentConsts.MaxEntityTypeLength);
b.Property(x => x.EntityId).IsRequired().HasMaxLength(ContentConsts.MaxEntityIdLength);
b.Property(x => x.Value).IsRequired().HasMaxLength(ContentConsts.MaxValueLength);

Loading…
Cancel
Save