Browse Source

Comment on classes.

pull/17491/head
Halil İbrahim Kalkan 3 years ago
parent
commit
19d4ccc502
  1. 3
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/DisableEntityChangeTrackingAttribute.cs
  2. 3
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EnableEntityChangeTrackingAttribute.cs
  3. 14
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs

3
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/DisableEntityChangeTrackingAttribute.cs

@ -2,6 +2,9 @@ using System;
namespace Volo.Abp.Domain.Repositories;
/// <summary>
/// Ensures that the change tracking in enabled for the given method or class.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface)]
public class DisableEntityChangeTrackingAttribute : EntityChangeTrackingAttribute
{

3
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EnableEntityChangeTrackingAttribute.cs

@ -2,6 +2,9 @@ using System;
namespace Volo.Abp.Domain.Repositories;
/// <summary>
/// Ensures that the change tracking in enabled for the given method or class.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface)]
public class EnableEntityChangeTrackingAttribute : EntityChangeTrackingAttribute
{

14
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs

@ -145,11 +145,25 @@ public static class RepositoryExtensions
}
}
/// <summary>
/// Disables change tracking mechanism for the given repository.
/// </summary>
/// <param name="repository">A repository object</param>
/// <returns>
/// A disposable object. Dispose it to restore change tracking mechanism back to its previous state.
/// </returns>
public static IDisposable DisableTracking(this IRepository repository)
{
return Tracking(repository, false);
}
/// <summary>
/// Enables change tracking mechanism for the given repository.
/// </summary>
/// <param name="repository">A repository object</param>
/// <returns>
/// A disposable object. Dispose it to restore change tracking mechanism back to its previous state.
/// </returns>
public static IDisposable EnableTracking(this IRepository repository)
{
return Tracking(repository, true);

Loading…
Cancel
Save