From 19d4ccc502e332d1a2dfa6a75e133407698f4cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 3 Sep 2023 14:49:12 +0300 Subject: [PATCH] Comment on classes. --- .../DisableEntityChangeTrackingAttribute.cs | 3 +++ .../EnableEntityChangeTrackingAttribute.cs | 3 +++ .../Domain/Repositories/RepositoryExtensions.cs | 14 ++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/DisableEntityChangeTrackingAttribute.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/DisableEntityChangeTrackingAttribute.cs index d6a73cba32..76a2bdeaa1 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/DisableEntityChangeTrackingAttribute.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/DisableEntityChangeTrackingAttribute.cs @@ -2,6 +2,9 @@ using System; namespace Volo.Abp.Domain.Repositories; +/// +/// Ensures that the change tracking in enabled for the given method or class. +/// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface)] public class DisableEntityChangeTrackingAttribute : EntityChangeTrackingAttribute { diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EnableEntityChangeTrackingAttribute.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EnableEntityChangeTrackingAttribute.cs index a94df978fb..9765d3253f 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EnableEntityChangeTrackingAttribute.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EnableEntityChangeTrackingAttribute.cs @@ -2,6 +2,9 @@ using System; namespace Volo.Abp.Domain.Repositories; +/// +/// Ensures that the change tracking in enabled for the given method or class. +/// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface)] public class EnableEntityChangeTrackingAttribute : EntityChangeTrackingAttribute { diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs index 710140d2ec..d40449a2e4 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs @@ -145,11 +145,25 @@ public static class RepositoryExtensions } } + /// + /// Disables change tracking mechanism for the given repository. + /// + /// A repository object + /// + /// A disposable object. Dispose it to restore change tracking mechanism back to its previous state. + /// public static IDisposable DisableTracking(this IRepository repository) { return Tracking(repository, false); } + /// + /// Enables change tracking mechanism for the given repository. + /// + /// A repository object + /// + /// A disposable object. Dispose it to restore change tracking mechanism back to its previous state. + /// public static IDisposable EnableTracking(this IRepository repository) { return Tracking(repository, true);