Skip to content

Commit 1be201c

Browse files
committed
Add documentation to IncrementCounterAsync
1 parent 896f8e3 commit 1be201c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

JohnKnoop.MongoRepository/source/IRepository.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ Task UpdateManyAsync(Expression<Func<TEntity, bool>> filter,
129129
string update,
130130
UpdateOptions options = null);
131131

132+
/// <summary>
133+
/// Increments a counter (stored in the _counters collection) and returns the new value
134+
/// </summary>
135+
/// <param name="name">The name of the counter. Use if you need more than one counter per collection.</param>
136+
/// <param name="incrementBy">The size of the increment</param>
137+
/// <returns>The new value of the counter</returns>
132138
Task<long> IncrementCounterAsync(string name = null, int incrementBy = 1);
133139
Task<long?> GetCounterValueAsync(string name = null);
134140
Task ResetCounterAsync(string name = null, long newValue = 1);

0 commit comments

Comments
 (0)