Skip to content

Commit a932679

Browse files
author
jaguzman
committed
Added a new variant to the get method which takes in a string based path collection to fetch
1 parent 6dc3eaf commit a932679

File tree

5 files changed

+825
-27
lines changed

5 files changed

+825
-27
lines changed

src/DotNetToolkit.Repository/Internal/ReadOnlyServiceWrapper.cs

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ public TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3)
4040
return _underlyingService.Get(key1, key2, key3);
4141
}
4242

43+
public TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3, params string[] paths)
44+
{
45+
return _underlyingService.Get(key1, key2, key3, paths);
46+
}
47+
48+
public TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3, params Expression<Func<TEntity, object>>[] paths)
49+
{
50+
return _underlyingService.Get(key1, key2, key3, paths);
51+
}
52+
4353
public TEntity Get(TKey1 key1, TKey2 key2, TKey3 key3, IFetchQueryStrategy<TEntity> fetchStrategy)
4454
{
4555
return _underlyingService.Get(key1, key2, key3, fetchStrategy);
@@ -160,6 +170,26 @@ public IPagedQueryResult<IEnumerable<TResult>> GetGroupBy<TGroupKey, TResult>(IQ
160170
return _underlyingService.GetAsync(key1, key2, key3, cancellationToken);
161171
}
162172

173+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, params string[] paths)
174+
{
175+
return _underlyingService.GetAsync(key1, key2, key3, paths);
176+
}
177+
178+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, string[] paths, CancellationToken cancellationToken = new CancellationToken())
179+
{
180+
return _underlyingService.GetAsync(key1, key2, key3, paths, cancellationToken);
181+
}
182+
183+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, params Expression<Func<TEntity, object>>[] paths)
184+
{
185+
return _underlyingService.GetAsync(key1, key2, key3, paths);
186+
}
187+
188+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
189+
{
190+
return _underlyingService.GetAsync(key1, key2, key3, paths, cancellationToken);
191+
}
192+
163193
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, TKey3 key3, IFetchQueryStrategy<TEntity> fetchStrategy, CancellationToken cancellationToken = new CancellationToken())
164194
{
165195
return _underlyingService.GetAsync(key1, key2, key3, fetchStrategy, cancellationToken);
@@ -306,6 +336,16 @@ public TEntity Get(TKey1 key1, TKey2 key2)
306336
return _underlyingService.Get(key1, key2);
307337
}
308338

339+
public TEntity Get(TKey1 key1, TKey2 key2, params string[] paths)
340+
{
341+
return _underlyingService.Get(key1, key2, paths);
342+
}
343+
344+
public TEntity Get(TKey1 key1, TKey2 key2, params Expression<Func<TEntity, object>>[] paths)
345+
{
346+
return _underlyingService.Get(key1, key2, paths);
347+
}
348+
309349
public TEntity Get(TKey1 key1, TKey2 key2, IFetchQueryStrategy<TEntity> fetchStrategy)
310350
{
311351
return _underlyingService.Get(key1, key2, fetchStrategy);
@@ -426,6 +466,26 @@ public IPagedQueryResult<IEnumerable<TResult>> GetGroupBy<TGroupKey, TResult>(IQ
426466
return _underlyingService.GetAsync(key1, key2, cancellationToken);
427467
}
428468

469+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params string[] paths)
470+
{
471+
return _underlyingService.GetAsync(key1, key2, paths);
472+
}
473+
474+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, string[] paths, CancellationToken cancellationToken = new CancellationToken())
475+
{
476+
return _underlyingService.GetAsync(key1, key2, paths, cancellationToken);
477+
}
478+
479+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, params Expression<Func<TEntity, object>>[] paths)
480+
{
481+
return _underlyingService.GetAsync(key1, key2, paths);
482+
}
483+
484+
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
485+
{
486+
return _underlyingService.GetAsync(key1, key2, paths, cancellationToken);
487+
}
488+
429489
public Task<TEntity> GetAsync(TKey1 key1, TKey2 key2, IFetchQueryStrategy<TEntity> fetchStrategy, CancellationToken cancellationToken = new CancellationToken())
430490
{
431491
return _underlyingService.GetAsync(key1, key2, fetchStrategy, cancellationToken);
@@ -572,6 +632,16 @@ public TEntity Get(TKey key)
572632
return _underlyingService.Get(key);
573633
}
574634

635+
public TEntity Get(TKey key, params string[] paths)
636+
{
637+
return _underlyingService.Get(key, paths);
638+
}
639+
640+
public TEntity Get(TKey key, params Expression<Func<TEntity, object>>[] paths)
641+
{
642+
return _underlyingService.Get(key, paths);
643+
}
644+
575645
public TEntity Get(TKey key, IFetchQueryStrategy<TEntity> fetchStrategy)
576646
{
577647
return _underlyingService.Get(key, fetchStrategy);
@@ -692,6 +762,26 @@ public IPagedQueryResult<IEnumerable<TResult>> GetGroupBy<TGroupKey, TResult>(IQ
692762
return _underlyingService.GetAsync(key, cancellationToken);
693763
}
694764

765+
public Task<TEntity> GetAsync(TKey key, params string[] paths)
766+
{
767+
return _underlyingService.GetAsync(key, paths);
768+
}
769+
770+
public Task<TEntity> GetAsync(TKey key, string[] paths, CancellationToken cancellationToken = new CancellationToken())
771+
{
772+
return _underlyingService.GetAsync(key, paths, cancellationToken);
773+
}
774+
775+
public Task<TEntity> GetAsync(TKey key, params Expression<Func<TEntity, object>>[] paths)
776+
{
777+
return _underlyingService.GetAsync(key, paths);
778+
}
779+
780+
public Task<TEntity> GetAsync(TKey key, Expression<Func<TEntity, object>>[] paths, CancellationToken cancellationToken = new CancellationToken())
781+
{
782+
return _underlyingService.GetAsync(key, paths, cancellationToken);
783+
}
784+
695785
public Task<TEntity> GetAsync(TKey key, IFetchQueryStrategy<TEntity> fetchStrategy, CancellationToken cancellationToken = new CancellationToken())
696786
{
697787
return _underlyingService.GetAsync(key, fetchStrategy, cancellationToken);

0 commit comments

Comments
 (0)