@@ -63,7 +63,7 @@ public BulkDescriptor DeleteMany<T>(IEnumerable<T> @objects, Func<BulkDeleteDesc
6363 /// </summary>
6464 /// <param name="ids">Enumerable of string ids to delete</param>
6565 /// <param name="bulkDeleteSelector">A func called on each ids to describe the individual delete operation</param>
66- public BulkDescriptor DeleteMany < T > ( IEnumerable < string > ids , Func < BulkDeleteDescriptor < T > , string , IBulkDeleteOperation < T > > bulkDeleteSelector = null ) where T : class =>
66+ public BulkDescriptor DeleteMany < T > ( IEnumerable < string > ids , Func < BulkDeleteDescriptor < T > , string , IBulkDeleteOperation < T > > bulkDeleteSelector = null ) where T : class =>
6767 Assign ( a => ids . ForEach ( o => AddOperation ( bulkDeleteSelector . InvokeOrDefault ( new BulkDeleteDescriptor < T > ( ) . Id ( o ) , o ) ) ) ) ;
6868
6969 /// <summary>
@@ -74,7 +74,25 @@ public BulkDescriptor DeleteMany<T>(IEnumerable<string> ids, Func<BulkDeleteDesc
7474 public BulkDescriptor DeleteMany < T > ( IEnumerable < long > ids , Func < BulkDeleteDescriptor < T > , long , IBulkDeleteOperation < T > > bulkDeleteSelector = null ) where T : class =>
7575 Assign ( a => ids . ForEach ( o => AddOperation ( bulkDeleteSelector . InvokeOrDefault ( new BulkDeleteDescriptor < T > ( ) . Id ( o ) , o ) ) ) ) ;
7676
77- public BulkDescriptor Update < T > ( Func < BulkUpdateDescriptor < T , T > , IBulkUpdateOperation < T , T > > bulkUpdateSelector ) where T : class =>
77+ /// <summary>
78+ /// Updatemany, convenience method to pass many objects at once to do multiple updates.
79+ /// </summary>
80+ /// <param name="objects">the objects to update</param>
81+ /// <param name="bulkUpdateSelector">An func called on each object to describe the individual update operation</param>
82+ public BulkDescriptor UpdateMany < T > ( IEnumerable < T > @objects , Func < BulkUpdateDescriptor < T , T > , T , IBulkUpdateOperation < T , T > > bulkUpdateSelector ) where T : class =>
83+ Assign ( a => @objects . ForEach ( o => AddOperation ( bulkUpdateSelector . InvokeOrDefault ( new BulkUpdateDescriptor < T , T > ( ) . IdFrom ( o ) , o ) ) ) ) ;
84+
85+ /// <summary>
86+ /// Updatemany, convenience method to pass many objects at once to do multiple updates.
87+ /// </summary>
88+ /// <param name="objects">the objects to update</param>
89+ /// <param name="bulkUpdateSelector">An func called on each object to describe the individual update operation</param>
90+ public BulkDescriptor UpdateMany < T , TPartialDocument > ( IEnumerable < T > @objects , Func < BulkUpdateDescriptor < T , TPartialDocument > , T , IBulkUpdateOperation < T , TPartialDocument > > bulkUpdateSelector )
91+ where T : class
92+ where TPartialDocument : class =>
93+ Assign ( a => @objects . ForEach ( o => AddOperation ( bulkUpdateSelector . InvokeOrDefault ( new BulkUpdateDescriptor < T , TPartialDocument > ( ) . IdFrom ( o ) , o ) ) ) ) ;
94+
95+ public BulkDescriptor Update < T > ( Func < BulkUpdateDescriptor < T , T > , IBulkUpdateOperation < T , T > > bulkUpdateSelector ) where T : class =>
7896 this . Update < T , T > ( bulkUpdateSelector ) ;
7997
8098 public BulkDescriptor Update < T , TPartialDocument > ( Func < BulkUpdateDescriptor < T , TPartialDocument > , IBulkUpdateOperation < T , TPartialDocument > > bulkUpdateSelector )
0 commit comments