reformatting
This commit is contained in:
+157
-52
@@ -8,13 +8,12 @@ using MongoDbGenericRepository.Models;
|
||||
namespace MongoDbGenericRepository.DataAccess.Update
|
||||
{
|
||||
/// <summary>
|
||||
/// The IBaseMongoRepository_Update_ClientSession interface exposing update functionality with a IClientSessionHandle.
|
||||
/// The IBaseMongoRepository_Update_ClientSession interface exposing update functionality with a IClientSessionHandle.
|
||||
/// </summary>
|
||||
public interface IBaseMongoRepository_Update_ClientSession
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -24,12 +23,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="field">The field to update.</param>
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -40,12 +43,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value, CancellationToken cancellationToken)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -56,12 +64,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -73,12 +86,18 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey, CancellationToken cancellationToken)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -88,12 +107,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="field">The field to update.</param>
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -104,12 +127,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, CancellationToken cancellationToken)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -120,12 +148,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -137,12 +170,18 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey, CancellationToken cancellationToken)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -152,12 +191,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="field">The field to update.</param>
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, TDocument documentToModify, Expression<Func<TDocument, TField>> field, TField value)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
TDocument documentToModify,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -168,12 +211,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey, TField>(IClientSessionHandle session, TDocument documentToModify, Expression<Func<TDocument, TField>> field, TField value, CancellationToken cancellationToken)
|
||||
bool UpdateOne<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
TDocument documentToModify,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -185,7 +233,7 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -198,7 +246,7 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -211,7 +259,7 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -220,12 +268,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="update">The update definition.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
bool UpdateOne<TDocument, TKey>(IClientSessionHandle session, TDocument documentToModify, UpdateDefinition<TDocument> update, CancellationToken cancellationToken)
|
||||
bool UpdateOne<TDocument, TKey>(
|
||||
IClientSessionHandle session,
|
||||
TDocument documentToModify,
|
||||
UpdateDefinition<TDocument> update,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -235,12 +287,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="field">The field to update.</param>
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -251,12 +307,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value, CancellationToken cancellationToken)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -267,12 +328,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -284,12 +350,18 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey, CancellationToken cancellationToken)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
Expression<Func<TDocument, bool>> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -299,12 +371,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="field">The field to update.</param>
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -315,12 +391,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, CancellationToken cancellationToken)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -331,12 +412,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -348,12 +434,18 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="partitionKey">The optional partition key.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, FilterDefinition<TDocument> filter, Expression<Func<TDocument, TField>> field, TField value, string partitionKey, CancellationToken cancellationToken)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
FilterDefinition<TDocument> filter,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
string partitionKey,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -363,12 +455,16 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="field">The field to update.</param>
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, TDocument documentToModify, Expression<Func<TDocument, TField>> field, TField value)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
TDocument documentToModify,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -379,12 +475,17 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="value">The value of the field.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(IClientSessionHandle session, TDocument documentToModify, Expression<Func<TDocument, TField>> field, TField value, CancellationToken cancellationToken)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
|
||||
IClientSessionHandle session,
|
||||
TDocument documentToModify,
|
||||
Expression<Func<TDocument, TField>> field,
|
||||
TField value,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -396,7 +497,7 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -409,7 +510,7 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -422,7 +523,7 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
/// <summary>
|
||||
/// Updates a document.
|
||||
/// Updates a document.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDocument">The type representing a Document.</typeparam>
|
||||
/// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
|
||||
@@ -431,7 +532,11 @@ namespace MongoDbGenericRepository.DataAccess.Update
|
||||
/// <param name="update">The update definition.</param>
|
||||
/// <param name="cancellationToken">The optional cancellation token.</param>
|
||||
/// <returns>A boolean value indicating success.</returns>
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey>(IClientSessionHandle session, TDocument documentToModify, UpdateDefinition<TDocument> update, CancellationToken cancellationToken)
|
||||
Task<bool> UpdateOneAsync<TDocument, TKey>(
|
||||
IClientSessionHandle session,
|
||||
TDocument documentToModify,
|
||||
UpdateDefinition<TDocument> update,
|
||||
CancellationToken cancellationToken)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user