Browse Source

Rename `Enabled` of `EntityChangeTrackingAttribute` to `IsEnabled`.

pull/17491/head
maliming 3 years ago
parent
commit
1b35f9c9f6
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 6
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs
  2. 2
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryInterceptor.cs

6
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs

@ -5,10 +5,10 @@ namespace Volo.Abp.Domain.Repositories;
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface)]
public abstract class EntityChangeTrackingAttribute : Attribute
{
public bool Enabled { get; set; }
public virtual bool IsEnabled { get; set; }
public EntityChangeTrackingAttribute(bool enabled)
public EntityChangeTrackingAttribute(bool isEnabled)
{
Enabled = enabled;
IsEnabled = isEnabled;
}
}

2
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryInterceptor.cs

@ -21,7 +21,7 @@ public class RepositoryInterceptor : AbpInterceptor, ITransientDependency
return;
}
using (_entityChangeTrackingProvider.Change(changeTrackingAttribute?.Enabled))
using (_entityChangeTrackingProvider.Change(changeTrackingAttribute?.IsEnabled))
{
await invocation.ProceedAsync();
}

Loading…
Cancel
Save