Skip to content

Commit 84f5de3

Browse files
Merge pull request #362 from johelvisguzman/issue272
Simplified query builder and mapper
2 parents 5422ed9 + 5b5ef22 commit 84f5de3

File tree

10 files changed

+1741
-1778
lines changed

10 files changed

+1741
-1778
lines changed

src/DotNetToolkit.Repository.AdoNet/Internal/AdoNetRepositoryContext.cs

Lines changed: 184 additions & 1232 deletions
Large diffs are not rendered by default.

src/DotNetToolkit.Repository.AdoNet/Internal/DbCommandExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static void AddParameters(this DbCommand command, Dictionary<string, obje
8989
}
9090
}
9191

92-
internal static bool ExecuteObjectExist(this DbCommand command, object obj)
92+
internal static bool ExecuteObjectExist(this DbHelper dbHelper, DbCommand command, object obj)
9393
{
9494
if (command == null)
9595
throw new ArgumentNullException(nameof(command));
@@ -109,7 +109,7 @@ internal static bool ExecuteObjectExist(this DbCommand command, object obj)
109109

110110
var existInDb = false;
111111

112-
using (var reader = command.ExecuteReader())
112+
using (var reader = dbHelper.ExecuteReader(command))
113113
{
114114
while (reader.Read())
115115
{
@@ -122,7 +122,7 @@ internal static bool ExecuteObjectExist(this DbCommand command, object obj)
122122
return existInDb;
123123
}
124124

125-
internal static async Task<bool> ExecuteObjectExistAsync(this DbCommand command, object obj, CancellationToken cancellationToken = new CancellationToken())
125+
internal static async Task<bool> ExecuteObjectExistAsync(this DbHelper dbHelper, DbCommand command, object obj, CancellationToken cancellationToken = new CancellationToken())
126126
{
127127
if (command == null)
128128
throw new ArgumentNullException(nameof(command));
@@ -142,7 +142,7 @@ internal static bool ExecuteObjectExist(this DbCommand command, object obj)
142142

143143
var existInDb = false;
144144

145-
using (var reader = await command.ExecuteReaderAsync(cancellationToken))
145+
using (var reader = await dbHelper.ExecuteReaderAsync(command, cancellationToken))
146146
{
147147
while (reader.Read())
148148
{

0 commit comments

Comments
 (0)