Skip to content

Commit 554baa8

Browse files
Merge pull request rsm-hcd#16 from SaidShah/add-xml-comments-for-repository-update-conductor
Added XML comments for the repositoryUpdateConductor methods
2 parents ad41450 + 5dbac44 commit 554baa8

File tree

2 files changed

+129
-4
lines changed

2 files changed

+129
-4
lines changed

src/AndcultureCode.CSharp.Conductors/AndcultureCode.CSharp.Conductors.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
- [FindById(id,ignoreQueryFilters,includeProperties)](#M-AndcultureCode-CSharp-Conductors-RepositoryReadConductor`1-FindById-System-Int64,System-Boolean,System-Linq-Expressions-Expression{System-Func{`0,System-Object}}[]- 'AndcultureCode.CSharp.Conductors.RepositoryReadConductor`1.FindById(System.Int64,System.Boolean,System.Linq.Expressions.Expression{System.Func{`0,System.Object}}[])')
1515
- [FindById(id,includeProperties)](#M-AndcultureCode-CSharp-Conductors-RepositoryReadConductor`1-FindById-System-Int64,System-Linq-Expressions-Expression{System-Func{`0,System-Object}}[]- 'AndcultureCode.CSharp.Conductors.RepositoryReadConductor`1.FindById(System.Int64,System.Linq.Expressions.Expression{System.Func{`0,System.Object}}[])')
1616
- [FindById(id,includeProperties)](#M-AndcultureCode-CSharp-Conductors-RepositoryReadConductor`1-FindById-System-Int64,System-String[]- 'AndcultureCode.CSharp.Conductors.RepositoryReadConductor`1.FindById(System.Int64,System.String[])')
17+
- [RepositoryUpdateConductor\`1](#T-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1 'AndcultureCode.CSharp.Conductors.RepositoryUpdateConductor`1')
18+
- [#ctor(repository)](#M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-#ctor-AndcultureCode-CSharp-Core-Interfaces-Data-IRepository{`0}- 'AndcultureCode.CSharp.Conductors.RepositoryUpdateConductor`1.#ctor(AndcultureCode.CSharp.Core.Interfaces.Data.IRepository{`0})')
19+
- [CommandTimeout](#P-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-CommandTimeout 'AndcultureCode.CSharp.Conductors.RepositoryUpdateConductor`1.CommandTimeout')
20+
- [BulkUpdate(items,updatedBy)](#M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-BulkUpdate-System-Collections-Generic-IEnumerable{`0},System-Nullable{System-Int64}- 'AndcultureCode.CSharp.Conductors.RepositoryUpdateConductor`1.BulkUpdate(System.Collections.Generic.IEnumerable{`0},System.Nullable{System.Int64})')
21+
- [Update(item,updatedBy)](#M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-Update-`0,System-Nullable{System-Int64}- 'AndcultureCode.CSharp.Conductors.RepositoryUpdateConductor`1.Update(`0,System.Nullable{System.Int64})')
22+
- [Update(items,updatedBy)](#M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-Update-System-Collections-Generic-IEnumerable{`0},System-Nullable{System-Int64}- 'AndcultureCode.CSharp.Conductors.RepositoryUpdateConductor`1.Update(System.Collections.Generic.IEnumerable{`0},System.Nullable{System.Int64})')
1723

1824
<a name='T-AndcultureCode-CSharp-Conductors-RepositoryReadConductor`1'></a>
1925
## RepositoryReadConductor\`1 `type`
@@ -222,3 +228,94 @@ The entity with the provided identity value.
222228
| ---- | ---- | ----------- |
223229
| id | [System.Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') | The entity identity value. |
224230
| includeProperties | [System.String[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String[] 'System.String[]') | Navigation properties that should be included. |
231+
232+
<a name='T-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1'></a>
233+
## RepositoryUpdateConductor\`1 `type`
234+
235+
##### Namespace
236+
237+
AndcultureCode.CSharp.Conductors
238+
239+
##### Summary
240+
241+
Ability to update an entity or a list of entities
242+
243+
##### Generic Types
244+
245+
| Name | Description |
246+
| ---- | ----------- |
247+
| T | |
248+
249+
<a name='M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-#ctor-AndcultureCode-CSharp-Core-Interfaces-Data-IRepository{`0}-'></a>
250+
### #ctor(repository) `constructor`
251+
252+
##### Summary
253+
254+
Constructor
255+
256+
##### Parameters
257+
258+
| Name | Type | Description |
259+
| ---- | ---- | ----------- |
260+
| repository | [AndcultureCode.CSharp.Core.Interfaces.Data.IRepository{\`0}](#T-AndcultureCode-CSharp-Core-Interfaces-Data-IRepository{`0} 'AndcultureCode.CSharp.Core.Interfaces.Data.IRepository{`0}') | |
261+
262+
<a name='P-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-CommandTimeout'></a>
263+
### CommandTimeout `property`
264+
265+
##### Summary
266+
267+
Ability to set and get the underlying DbContext's command timeout
268+
269+
<a name='M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-BulkUpdate-System-Collections-Generic-IEnumerable{`0},System-Nullable{System-Int64}-'></a>
270+
### BulkUpdate(items,updatedBy) `method`
271+
272+
##### Summary
273+
274+
Ability to update a list of entities in a single bulk operation.
275+
276+
##### Returns
277+
278+
279+
280+
##### Parameters
281+
282+
| Name | Type | Description |
283+
| ---- | ---- | ----------- |
284+
| items | [System.Collections.Generic.IEnumerable{\`0}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Collections.Generic.IEnumerable 'System.Collections.Generic.IEnumerable{`0}') | List of items to update |
285+
| updatedBy | [System.Nullable{System.Int64}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Nullable 'System.Nullable{System.Int64}') | Id of user updating the entity |
286+
287+
<a name='M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-Update-`0,System-Nullable{System-Int64}-'></a>
288+
### Update(item,updatedBy) `method`
289+
290+
##### Summary
291+
292+
Ability to update an entity
293+
294+
##### Returns
295+
296+
297+
298+
##### Parameters
299+
300+
| Name | Type | Description |
301+
| ---- | ---- | ----------- |
302+
| item | [\`0](#T-`0 '`0') | Item to update |
303+
| updatedBy | [System.Nullable{System.Int64}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Nullable 'System.Nullable{System.Int64}') | Id of user updating the entity |
304+
305+
<a name='M-AndcultureCode-CSharp-Conductors-RepositoryUpdateConductor`1-Update-System-Collections-Generic-IEnumerable{`0},System-Nullable{System-Int64}-'></a>
306+
### Update(items,updatedBy) `method`
307+
308+
##### Summary
309+
310+
Ability to update a list of items but each item is updated individually.
311+
312+
##### Returns
313+
314+
315+
316+
##### Parameters
317+
318+
| Name | Type | Description |
319+
| ---- | ---- | ----------- |
320+
| items | [System.Collections.Generic.IEnumerable{\`0}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Collections.Generic.IEnumerable 'System.Collections.Generic.IEnumerable{`0}') | List of items to update |
321+
| updatedBy | [System.Nullable{System.Int64}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Nullable 'System.Nullable{System.Int64}') | Id of user updating the entity |

src/AndcultureCode.CSharp.Conductors/RepositoryUpdateConductor.cs

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@
66

77
namespace AndcultureCode.CSharp.Conductors
88
{
9+
/// <summary>
10+
/// Ability to update an entity or a list of entities
11+
/// </summary>
12+
/// <typeparam name="T"></typeparam>
913
public class RepositoryUpdateConductor<T> : Conductor, IRepositoryUpdateConductor<T>
1014
where T : class, IEntity
1115
{
1216
#region Properties
1317

18+
/// <summary>
19+
/// Ability to set and get the underlying DbContext's command timeout
20+
/// </summary>
1421
public int? CommandTimeout
1522
{
1623
get => _repository.CommandTimeout;
@@ -19,37 +26,58 @@ public int? CommandTimeout
1926

2027
readonly IRepository<T> _repository;
2128

22-
#endregion
29+
#endregion Properties
2330

2431
#region Constructor
2532

33+
/// <summary>
34+
/// Constructor
35+
/// </summary>
36+
/// <param name="repository"></param>
2637
public RepositoryUpdateConductor(
2738
IRepository<T> repository
2839
)
2940
{
3041
_repository = repository;
3142
}
3243

33-
#endregion
44+
#endregion Constructor
3445

3546
#region IRepositoryUpdateConductor Implementation
3647

48+
/// <summary>
49+
/// Ability to update a list of entities in a single bulk operation.
50+
/// </summary>
51+
/// <param name="items">List of items to update</param>
52+
/// <param name="updatedBy">Id of user updating the entity</param>
53+
/// <returns></returns>
3754
public virtual IResult<bool> BulkUpdate(IEnumerable<T> items, long? updatedBy = default(long?))
3855
{
3956
return _repository.BulkUpdate(items, updatedBy);
4057
}
4158

59+
/// <summary>
60+
/// Ability to update an entity
61+
/// </summary>
62+
/// <param name="item">Item to update</param>
63+
/// <param name="updatedBy">Id of user updating the entity</param>
64+
/// <returns></returns>
4265
public virtual IResult<bool> Update(T item, long? updatedBy = default(long?))
4366
{
4467
return _repository.Update(item, updatedBy);
4568
}
4669

70+
/// <summary>
71+
/// Ability to update a list of items but each item is updated individually.
72+
/// </summary>
73+
/// <param name="items">List of items to update</param>
74+
/// <param name="updatedBy">Id of user updating the entity</param>
75+
/// <returns></returns>
4776
public virtual IResult<bool> Update(IEnumerable<T> items, long? updatedBy = default(long?))
4877
{
4978
return _repository.Update(items, updatedBy);
5079
}
5180

52-
#endregion
53-
81+
#endregion IRepositoryUpdateConductor Implementation
5482
}
5583
}

0 commit comments

Comments
 (0)