Browse Source

Merge pull request #7764 from abpframework/tag-refactoring

CMS Kit- Tag Refactoring
pull/7784/head
İlkay İlknur 6 years ago
committed by GitHub
parent
commit
999c80a8ca
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 55
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs
  2. 2
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs
  3. 1
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/CmsKitTagOptions.cs
  4. 15
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/DefaultTagDefinitionStore.cs
  5. 6
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs
  6. 25
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTagManager.cs
  7. 21
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs
  8. 3
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagEntityTypeDefiniton.cs
  9. 62
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs
  10. 24
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs
  11. 2
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs

55
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs

@ -1,19 +1,17 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.CmsKit.Admin.Tags;
using Volo.CmsKit.Tags; using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags namespace Volo.CmsKit.Admin.Tags
{ {
public class EntityTagAdminAppService : CmsKitAdminAppServiceBase, IEntityTagAdminAppService public class EntityTagAdminAppService : CmsKitAdminAppServiceBase, IEntityTagAdminAppService
{ {
protected readonly ITagDefinitionStore _tagDefinitionStore; protected ITagDefinitionStore TagDefinitionStore { get; }
protected readonly IEntityTagManager _entityTagManager; protected IEntityTagManager EntityTagManager { get; }
protected readonly ITagManager _tagManager; protected ITagManager TagManager { get; }
protected readonly ITagRepository _tagRepository; protected ITagRepository TagRepository { get; }
protected readonly IEntityTagRepository _entityTagRepository; protected IEntityTagRepository EntityTagRepository { get; }
public EntityTagAdminAppService( public EntityTagAdminAppService(
ITagDefinitionStore tagDefinitionStore, ITagDefinitionStore tagDefinitionStore,
@ -22,60 +20,61 @@ namespace Volo.CmsKit.Admin.Tags
ITagRepository tagRepository, ITagRepository tagRepository,
IEntityTagRepository entityTagRepository) IEntityTagRepository entityTagRepository)
{ {
_tagDefinitionStore = tagDefinitionStore; TagDefinitionStore = tagDefinitionStore;
_entityTagManager = entityTagManager; EntityTagManager = entityTagManager;
_tagManager = tagManager; TagManager = tagManager;
_tagRepository = tagRepository; TagRepository = tagRepository;
_entityTagRepository = entityTagRepository; EntityTagRepository = entityTagRepository;
} }
public async Task AddTagToEntityAsync(EntityTagCreateDto input) public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input)
{ {
var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType);
await CheckPolicyAsync(definition.CreatePolicy); await CheckPolicyAsync(definition.CreatePolicy);
var tag = await _tagManager.GetOrAddAsync(input.EntityType, input.TagName, CurrentTenant?.Id); var tag = await TagManager.GetOrAddAsync(input.EntityType, input.TagName, CurrentTenant?.Id);
await _entityTagManager.AddTagToEntityAsync( await EntityTagManager.AddTagToEntityAsync(
tag.Id, tag.Id,
input.EntityType, input.EntityType,
input.EntityId, input.EntityId,
CurrentTenant?.Id); CurrentTenant?.Id);
} }
public async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input) public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input)
{ {
var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType);
await CheckPolicyAsync(definition.DeletePolicy); await CheckPolicyAsync(definition.DeletePolicy);
await _entityTagManager.RemoveTagFromEntityAsync( await EntityTagManager.RemoveTagFromEntityAsync(
input.TagId, input.TagId,
input.EntityType, input.EntityType,
input.EntityId, input.EntityId,
CurrentTenant?.Id); CurrentTenant?.Id);
} }
public async Task SetEntityTagsAsync(EntityTagSetDto input) public virtual async Task SetEntityTagsAsync(EntityTagSetDto input)
{ {
var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType);
await CheckPolicyAsync(definition.UpdatePolicy); await CheckPolicyAsync(definition.UpdatePolicy);
var existingTags = await _tagRepository.GetAllRelatedTagsAsync(input.EntityType, input.EntityId, CurrentTenant?.Id); var existingTags =
await TagRepository.GetAllRelatedTagsAsync(input.EntityType, input.EntityId, CurrentTenant?.Id);
var deletedTags = existingTags.Where(x => !input.Tags.Contains(x.Name)).ToList(); var deletedTags = existingTags.Where(x => !input.Tags.Contains(x.Name)).ToList();
var addedTags = input.Tags.Where(x => !existingTags.Any(a => a.Name == x)); var addedTags = input.Tags.Where(x => !existingTags.Any(a => a.Name == x));
await _entityTagRepository.DeleteManyAsync(deletedTags.Select(s => s.Id).ToArray()); await EntityTagRepository.DeleteManyAsync(deletedTags.Select(s => s.Id).ToArray());
foreach (var addedTag in addedTags) foreach (var addedTag in addedTags)
{ {
var tag = await _tagManager.GetOrAddAsync(input.EntityType, addedTag, CurrentTenant?.Id); var tag = await TagManager.GetOrAddAsync(input.EntityType, addedTag, CurrentTenant?.Id);
await _entityTagManager.AddTagToEntityAsync(tag.Id, input.EntityType, input.EntityId, CurrentTenant?.Id); await EntityTagManager.AddTagToEntityAsync(tag.Id, input.EntityType, input.EntityId, CurrentTenant?.Id);
} }
} }
} }
} }

2
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs

@ -72,7 +72,7 @@ namespace Volo.CmsKit.Admin.Tags
x.EntityType.ToLower().Contains(input.Filter)); x.EntityType.ToLower().Contains(input.Filter));
} }
public async Task<List<TagDefinitionDto>> GetTagDefinitionsAsync() public virtual async Task<List<TagDefinitionDto>> GetTagDefinitionsAsync()
{ {
var definitions = await TagManager.GetTagDefinitionsAsync(); var definitions = await TagManager.GetTagDefinitionsAsync();

1
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/CmsKitTagOptions.cs

@ -1,5 +1,4 @@
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Tags namespace Volo.CmsKit.Tags
{ {

15
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/DefaultTagDefinitionStore.cs

@ -11,11 +11,11 @@ namespace Volo.CmsKit.Tags
{ {
public class DefaultTagDefinitionStore : ITagDefinitionStore, ITransientDependency public class DefaultTagDefinitionStore : ITagDefinitionStore, ITransientDependency
{ {
private readonly CmsKitTagOptions options; protected CmsKitTagOptions CmsKitTagOptions { get; }
public DefaultTagDefinitionStore(IOptions<CmsKitTagOptions> options) public DefaultTagDefinitionStore(IOptions<CmsKitTagOptions> options)
{ {
this.options = options.Value; CmsKitTagOptions = options.Value;
} }
/// <summary> /// <summary>
@ -28,7 +28,8 @@ namespace Volo.CmsKit.Tags
{ {
Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityType, nameof(entityType));
var result = options.EntityTypes.SingleOrDefault(x => x.EntityType == entityType) ?? throw new EntityNotTaggableException(entityType); var result = CmsKitTagOptions.EntityTypes.SingleOrDefault(x => x.EntityType == entityType) ??
throw new EntityNotTaggableException(entityType);
return Task.FromResult(result); return Task.FromResult(result);
} }
@ -38,7 +39,7 @@ namespace Volo.CmsKit.Tags
/// </summary> /// </summary>
public virtual Task<List<TagEntityTypeDefiniton>> GetTagEntityTypeDefinitionListAsync() public virtual Task<List<TagEntityTypeDefiniton>> GetTagEntityTypeDefinitionListAsync()
{ {
return Task.FromResult(options.EntityTypes.ToList()); return Task.FromResult(CmsKitTagOptions.EntityTypes.ToList());
} }
/// <summary> /// <summary>
@ -50,9 +51,9 @@ namespace Volo.CmsKit.Tags
{ {
Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityType, nameof(entityType));
var definition = options.EntityTypes.SingleOrDefault(x => x.EntityType == entityType); var isDefined = CmsKitTagOptions.EntityTypes.Any(x => x.EntityType == entityType);
return Task.FromResult(definition != null); return Task.FromResult(isDefined);
} }
} }
} }

6
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs

@ -1,4 +1,6 @@
using System; using System;
using JetBrains.Annotations;
using Volo.Abp;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
@ -16,10 +18,10 @@ namespace Volo.CmsKit.Tags
{ {
} }
internal EntityTag(Guid tagId, string entityId, Guid? tenantId = null) internal EntityTag(Guid tagId, [NotNull] string entityId, Guid? tenantId = null)
{ {
TagId = tagId; TagId = tagId;
EntityId = entityId; EntityId = Check.NotNullOrEmpty(entityId,nameof(entityId));
TenantId = tenantId; TenantId = tenantId;
} }

25
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTagManager.cs

@ -3,50 +3,47 @@ using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Tags namespace Volo.CmsKit.Tags
{ {
public class EntityTagManager : DomainService, IEntityTagManager public class EntityTagManager : DomainService, IEntityTagManager
{ {
protected readonly IEntityTagRepository _entityTagRepository; protected IEntityTagRepository EntityTagRepository { get; }
protected readonly ITagDefinitionStore _tagDefinitionStore; protected ITagDefinitionStore TagDefinitionStore { get; }
public EntityTagManager( public EntityTagManager(
IEntityTagRepository entityTagRepository, IEntityTagRepository entityTagRepository,
ITagDefinitionStore tagDefinitionStore) ITagDefinitionStore tagDefinitionStore)
{ {
_entityTagRepository = entityTagRepository; EntityTagRepository = entityTagRepository;
_tagDefinitionStore = tagDefinitionStore; TagDefinitionStore = tagDefinitionStore;
} }
public async Task<EntityTag> AddTagToEntityAsync( public virtual async Task<EntityTag> AddTagToEntityAsync(
[NotNull] Guid tagId, [NotNull] Guid tagId,
[NotNull] string entityType, [NotNull] string entityType,
[NotNull] string entityId, [NotNull] string entityId,
[CanBeNull] Guid? tenantId = null, [CanBeNull] Guid? tenantId = null,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
if (!await _tagDefinitionStore.IsDefinedAsync(entityType)) if (!await TagDefinitionStore.IsDefinedAsync(entityType))
{ {
throw new EntityNotTaggableException(entityType); throw new EntityNotTaggableException(entityType);
} }
var entityTag = new EntityTag(tagId, entityId, tenantId); var entityTag = new EntityTag(tagId, entityId, tenantId);
return await EntityTagRepository.InsertAsync(entityTag, cancellationToken: cancellationToken);
return await _entityTagRepository.InsertAsync(entityTag, cancellationToken: cancellationToken);
} }
public async Task RemoveTagFromEntityAsync( public virtual async Task RemoveTagFromEntityAsync(
[NotNull] Guid tagId, [NotNull] Guid tagId,
[NotNull] string entityType, [NotNull] string entityType,
[NotNull] string entityId, [NotNull] string entityId,
[CanBeNull] Guid? tenantId = null, [CanBeNull] Guid? tenantId = null,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var entityTag = await _entityTagRepository.FindAsync(tagId, entityId, tenantId, cancellationToken); var entityTag = await EntityTagRepository.FindAsync(tagId, entityId, tenantId, cancellationToken);
await EntityTagRepository.DeleteAsync(entityTag, cancellationToken: cancellationToken);
await _entityTagRepository.DeleteAsync(entityTag);
} }
} }
} }

21
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs

@ -8,11 +8,13 @@ namespace Volo.CmsKit.Tags
{ {
public class Tag : FullAuditedAggregateRoot<Guid>, IMultiTenant public class Tag : FullAuditedAggregateRoot<Guid>, IMultiTenant
{ {
public string EntityType { get; set; } public virtual Guid? TenantId { get; set; }
public string Name { get; protected set; } [NotNull]
public virtual string EntityType { get; protected set; }
public Guid? TenantId { get; set; }
[NotNull]
public virtual string Name { get; protected set; }
protected Tag() protected Tag()
{ {
@ -24,14 +26,19 @@ namespace Volo.CmsKit.Tags
[NotNull] string name, [NotNull] string name,
Guid? tenantId = null) : base(id) Guid? tenantId = null) : base(id)
{ {
EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength);
SetName(name); Name = Check.NotNullOrEmpty(name, nameof(name), TagConsts.MaxNameLength);
TenantId = tenantId; TenantId = tenantId;
} }
public void SetName(string name) public virtual void SetName(string name)
{ {
Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength);
} }
public virtual void SetEntityType(string entityType)
{
EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength);
}
} }
} }

3
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagEntityTypeDefiniton.cs

@ -25,13 +25,12 @@ namespace Volo.CmsKit.Tags
[CanBeNull] string deletePolicy = null) : base(createPolicy, updatePolicy, deletePolicy) [CanBeNull] string deletePolicy = null) : base(createPolicy, updatePolicy, deletePolicy)
{ {
EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType));
DisplayName = displayName; DisplayName = displayName;
} }
public bool Equals(TagEntityTypeDefiniton other) public bool Equals(TagEntityTypeDefiniton other)
{ {
return EntityType == other.EntityType; return EntityType == other?.EntityType;
} }
} }
} }

62
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs

@ -1,35 +1,27 @@
using JetBrains.Annotations; using JetBrains.Annotations;
using Microsoft.Extensions.Options;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
namespace Volo.CmsKit.Tags namespace Volo.CmsKit.Tags
{ {
public class TagManager : DomainService, ITagManager public class TagManager : DomainService, ITagManager
{ {
private readonly ITagRepository _tagRepository; protected ITagRepository TagRepository { get; }
private readonly ITagDefinitionStore _tagDefinitionStore; protected ITagDefinitionStore TagDefinitionStore { get; }
public TagManager( public TagManager(ITagRepository tagRepository, ITagDefinitionStore tagDefinitionStore)
ITagRepository tagRepository,
ITagDefinitionStore tagDefinitionStore)
{ {
_tagRepository = tagRepository; TagRepository = tagRepository;
_tagDefinitionStore = tagDefinitionStore; TagDefinitionStore = tagDefinitionStore;
} }
public async Task<Tag> GetOrAddAsync( public virtual async Task<Tag> GetOrAddAsync([NotNull] string entityType, [NotNull] string name,
[NotNull] string entityType, Guid? tenantId = null, CancellationToken cancellationToken = default)
[NotNull] string name,
Guid? tenantId = null,
CancellationToken cancellationToken = default)
{ {
var entity = await _tagRepository.FindAsync(entityType, name, tenantId, cancellationToken); var entity = await TagRepository.FindAsync(entityType, name, tenantId, cancellationToken);
if (entity == null) if (entity == null)
{ {
@ -39,53 +31,43 @@ namespace Volo.CmsKit.Tags
return entity; return entity;
} }
public async Task<Tag> InsertAsync( public virtual async Task<Tag> InsertAsync(Guid id, [NotNull] string entityType, [NotNull] string name,
Guid id, Guid? tenantId = null, CancellationToken cancellationToken = default)
[NotNull] string entityType,
[NotNull] string name,
Guid? tenantId = null,
CancellationToken cancellationToken = default)
{ {
if (await _tagRepository.AnyAsync(entityType, name, tenantId, cancellationToken)) if (!await TagDefinitionStore.IsDefinedAsync(entityType))
{ {
throw new TagAlreadyExistException(entityType, name); throw new EntityNotTaggableException(entityType);
} }
if (!await _tagDefinitionStore.IsDefinedAsync(entityType)) if (await TagRepository.AnyAsync(entityType, name, tenantId, cancellationToken))
{ {
throw new EntityNotTaggableException(entityType); throw new TagAlreadyExistException(entityType, name);
} }
return await _tagRepository.InsertAsync( return await TagRepository.InsertAsync(new Tag(id, entityType, name, tenantId),
new Tag(
id,
entityType,
name,
tenantId),
cancellationToken: cancellationToken); cancellationToken: cancellationToken);
} }
public async Task<Tag> UpdateAsync( public virtual async Task<Tag> UpdateAsync(Guid id, [NotNull] string name,
Guid id,
[NotNull] string name,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var entity = await _tagRepository.GetAsync(id, cancellationToken: cancellationToken); var entity = await TagRepository.GetAsync(id, cancellationToken: cancellationToken);
if (name != entity.Name && if (name != entity.Name &&
await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) await TagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken))
{ {
throw new TagAlreadyExistException(entity.EntityType, name); throw new TagAlreadyExistException(entity.EntityType, name);
} }
entity.SetName(name); entity.SetName(name);
return await _tagRepository.UpdateAsync(entity, cancellationToken: cancellationToken); return await TagRepository.UpdateAsync(entity, cancellationToken: cancellationToken);
} }
public Task<List<TagEntityTypeDefiniton>> GetTagDefinitionsAsync(CancellationToken cancellationToken = default) public virtual Task<List<TagEntityTypeDefiniton>> GetTagDefinitionsAsync(
CancellationToken cancellationToken = default)
{ {
return _tagDefinitionStore.GetTagEntityTypeDefinitionListAsync(); return TagDefinitionStore.GetTagEntityTypeDefinitionListAsync();
} }
} }
} }

24
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs

@ -1,8 +1,6 @@
using JetBrains.Annotations; using JetBrains.Annotations;
using Nito.Disposables;
using System; using System;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
@ -11,30 +9,32 @@ using Volo.CmsKit.EntityFrameworkCore;
namespace Volo.CmsKit.Tags namespace Volo.CmsKit.Tags
{ {
public class EfCoreEntityTagRepository: EfCoreRepository<ICmsKitDbContext, EntityTag>, IEntityTagRepository public class EfCoreEntityTagRepository : EfCoreRepository<ICmsKitDbContext, EntityTag>, IEntityTagRepository
{ {
public EfCoreEntityTagRepository(IDbContextProvider<ICmsKitDbContext> dbContextProvider) : base(dbContextProvider) public EfCoreEntityTagRepository(IDbContextProvider<ICmsKitDbContext> dbContextProvider) : base(
dbContextProvider)
{ {
} }
public async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default) public virtual async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default)
{ {
var dbSet = await GetDbSetAsync(); var dbContext = await GetDbContextAsync();
var dbSet = dbContext.Set<EntityTag>();
dbSet.RemoveRange(dbSet.Where(x => tagIds.Contains(x.TagId))); dbSet.RemoveRange(dbSet.Where(x => tagIds.Contains(x.TagId)));
await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken));
} }
public Task<EntityTag> FindAsync( public virtual Task<EntityTag> FindAsync(
[NotNull] Guid tagId, [NotNull] Guid tagId,
[NotNull] string entityId, [NotNull] string entityId,
[CanBeNull] Guid? tenantId, [CanBeNull] Guid? tenantId,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return base.FindAsync(x => return base.FindAsync(x =>
x.TagId == tagId && x.TagId == tagId &&
x.EntityId == entityId && x.EntityId == entityId &&
x.TenantId == tenantId, x.TenantId == tenantId,
cancellationToken: cancellationToken); cancellationToken: cancellationToken);
} }
} }
} }

2
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs

@ -5,10 +5,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.VirtualFileSystem;
using Volo.CmsKit.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore;
namespace Volo.CmsKit.Tags namespace Volo.CmsKit.Tags

Loading…
Cancel
Save