Skip to content

Commit 115162a

Browse files
committed
ReadMany<T3>(splitOn)
1 parent bbb7f48 commit 115162a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/Dibix/Access/IMultipleResultReader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public interface IMultipleResultReader : IDisposable
1313
IEnumerable<TReturn> ReadMany<TReturn, TSecond>(string splitOn) where TReturn : new();
1414
IEnumerable<TReturn> ReadMany<TFirst, TSecond, TReturn>(Func<TFirst, TSecond, TReturn> map, string splitOn);
1515
IEnumerable<TReturn> ReadManyProjection<TFirst, TSecond, TReturn>(string splitOn) where TReturn : new();
16+
IEnumerable<TReturn> ReadMany<TReturn, TSecond, TThird>(string splitOn) where TReturn : new();
1617
IEnumerable<TReturn> ReadMany<TFirst, TSecond, TThird, TReturn>(Func<TFirst, TSecond, TThird, TReturn> map, string splitOn);
1718
IEnumerable<TReturn> ReadMany<TReturn, TSecond, TThird, TFourth>(string splitOn) where TReturn : new();
1819
IEnumerable<TReturn> ReadMany<TFirst, TSecond, TThird, TFourth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TReturn> map, string splitOn);

src/Dibix/Access/MultipleResultReader.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ protected MultipleResultReader(string commandText, CommandType commandType, Para
4949

5050
IEnumerable<TReturn> IMultipleResultReader.ReadMany<TFirst, TSecond, TThird, TReturn>(Func<TFirst, TSecond, TThird, TReturn> map, string splitOn) => this.Execute(() => this.ReadMany(map, splitOn).PostProcess());
5151

52+
// OrderManagement (LoadProductRuntime)
53+
public IEnumerable<TReturn> ReadMany<TReturn, TSecond, TThird>(string splitOn) where TReturn : new() => this.Execute(() =>
54+
{
55+
MultiMapper multiMapper = new MultiMapper();
56+
return this.ReadMany<TReturn, TSecond, TThird, TReturn>((a, b, c) => multiMapper.MapRow<TReturn>(useProjection: false, a, b, c), splitOn)
57+
.PostProcess(multiMapper);
58+
});
59+
5260
// OrderManagement (GetProduct)
5361
public IEnumerable<TReturn> ReadMany<TReturn, TSecond, TThird, TFourth>(string splitOn) where TReturn : new() => this.Execute(() =>
5462
{

0 commit comments

Comments
 (0)