Skip to content

Commit dd57067

Browse files
authored
Merge pull request #277 from loresoft/feature/method-injectors
Feature/method injectors
2 parents 1900db6 + 7251390 commit dd57067

40 files changed

+540
-384
lines changed

FluentCommand.sln

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.SQLite.Tests"
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.SqlServer.Tests", "test\FluentCommand.SqlServer.Tests\FluentCommand.SqlServer.Tests.csproj", "{5DE2495F-EC9E-49C5-8211-5ACB44A780A8}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Batch", "src\FluentCommand.Batch\FluentCommand.Batch.csproj", "{9DEC5471-EEFE-48EC-8D7A-BEE501087F38}"
17-
EndProject
1816
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Batch.Tests", "test\FluentCommand.Batch.Tests\FluentCommand.Batch.Tests.csproj", "{CCC34DD0-4706-44CB-AC03-A0E607F449A2}"
1917
EndProject
2018
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{38D98603-4878-4CFA-ACF5-5BEC1218B149}"
@@ -29,19 +27,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Tests", "test
2927
EndProject
3028
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.PostgreSQL.Tests", "test\FluentCommand.PostgreSQL.Tests\FluentCommand.PostgreSQL.Tests.csproj", "{CFCFEA34-ABFA-490E-85BF-A7DC12392245}"
3129
EndProject
32-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.EntityFactory", "src\FluentCommand.EntityFactory\FluentCommand.EntityFactory.csproj", "{F05DE8E6-1CBB-4304-8D41-68D9BB5DF6B6}"
33-
EndProject
3430
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.SqlServer", "src\FluentCommand.SqlServer\FluentCommand.SqlServer.csproj", "{536C4B33-C1D8-495B-A282-97F525BF994D}"
3531
EndProject
36-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2BE1C80C-1E25-4143-8319-0217575B2560}"
37-
ProjectSection(SolutionItems) = preProject
38-
README.md = README.md
39-
EndProjectSection
40-
EndProject
4132
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Json", "src\FluentCommand.Json\FluentCommand.Json.csproj", "{5DC02823-0A42-4C2D-8E49-C0BEA9CAE97A}"
4233
EndProject
43-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Dapper", "src\FluentCommand.Dapper\FluentCommand.Dapper.csproj", "{47EE3C3A-178C-4AE5-8A54-F3791FA76E08}"
44-
EndProject
4534
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Generators", "src\FluentCommand.Generators\FluentCommand.Generators.csproj", "{43DCCD08-D585-4905-95A9-120D300C512A}"
4635
EndProject
4736
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand.Generators.Tests", "test\FluentCommand.Generators.Tests\FluentCommand.Generators.Tests.csproj", "{00F44ED1-561E-43DC-ABC1-A78411FFC6F3}"
@@ -68,10 +57,6 @@ Global
6857
{5DE2495F-EC9E-49C5-8211-5ACB44A780A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
6958
{5DE2495F-EC9E-49C5-8211-5ACB44A780A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
7059
{5DE2495F-EC9E-49C5-8211-5ACB44A780A8}.Release|Any CPU.Build.0 = Release|Any CPU
71-
{9DEC5471-EEFE-48EC-8D7A-BEE501087F38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
72-
{9DEC5471-EEFE-48EC-8D7A-BEE501087F38}.Debug|Any CPU.Build.0 = Debug|Any CPU
73-
{9DEC5471-EEFE-48EC-8D7A-BEE501087F38}.Release|Any CPU.ActiveCfg = Release|Any CPU
74-
{9DEC5471-EEFE-48EC-8D7A-BEE501087F38}.Release|Any CPU.Build.0 = Release|Any CPU
7560
{CCC34DD0-4706-44CB-AC03-A0E607F449A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
7661
{CCC34DD0-4706-44CB-AC03-A0E607F449A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
7762
{CCC34DD0-4706-44CB-AC03-A0E607F449A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -84,10 +69,6 @@ Global
8469
{CFCFEA34-ABFA-490E-85BF-A7DC12392245}.Debug|Any CPU.Build.0 = Debug|Any CPU
8570
{CFCFEA34-ABFA-490E-85BF-A7DC12392245}.Release|Any CPU.ActiveCfg = Release|Any CPU
8671
{CFCFEA34-ABFA-490E-85BF-A7DC12392245}.Release|Any CPU.Build.0 = Release|Any CPU
87-
{F05DE8E6-1CBB-4304-8D41-68D9BB5DF6B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
88-
{F05DE8E6-1CBB-4304-8D41-68D9BB5DF6B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
89-
{F05DE8E6-1CBB-4304-8D41-68D9BB5DF6B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
90-
{F05DE8E6-1CBB-4304-8D41-68D9BB5DF6B6}.Release|Any CPU.Build.0 = Release|Any CPU
9172
{536C4B33-C1D8-495B-A282-97F525BF994D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
9273
{536C4B33-C1D8-495B-A282-97F525BF994D}.Debug|Any CPU.Build.0 = Debug|Any CPU
9374
{536C4B33-C1D8-495B-A282-97F525BF994D}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -96,10 +77,6 @@ Global
9677
{5DC02823-0A42-4C2D-8E49-C0BEA9CAE97A}.Debug|Any CPU.Build.0 = Debug|Any CPU
9778
{5DC02823-0A42-4C2D-8E49-C0BEA9CAE97A}.Release|Any CPU.ActiveCfg = Release|Any CPU
9879
{5DC02823-0A42-4C2D-8E49-C0BEA9CAE97A}.Release|Any CPU.Build.0 = Release|Any CPU
99-
{47EE3C3A-178C-4AE5-8A54-F3791FA76E08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
100-
{47EE3C3A-178C-4AE5-8A54-F3791FA76E08}.Debug|Any CPU.Build.0 = Debug|Any CPU
101-
{47EE3C3A-178C-4AE5-8A54-F3791FA76E08}.Release|Any CPU.ActiveCfg = Release|Any CPU
102-
{47EE3C3A-178C-4AE5-8A54-F3791FA76E08}.Release|Any CPU.Build.0 = Release|Any CPU
10380
{43DCCD08-D585-4905-95A9-120D300C512A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
10481
{43DCCD08-D585-4905-95A9-120D300C512A}.Debug|Any CPU.Build.0 = Debug|Any CPU
10582
{43DCCD08-D585-4905-95A9-120D300C512A}.Release|Any CPU.ActiveCfg = Release|Any CPU

README.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Fluent Wrapper for DbCommand.
99
| Package | Version |
1010
| :--- | :--- |
1111
| [FluentCommand](https://www.nuget.org/packages/FluentCommand/) | [![FluentCommand](https://img.shields.io/nuget/v/FluentCommand.svg)](https://www.nuget.org/packages/FluentCommand/) |
12-
| [FluentCommand.Dapper](https://www.nuget.org/packages/FluentCommand.Dapper/) | [![FluentCommand.Dapper](https://img.shields.io/nuget/v/FluentCommand.Dapper.svg)](https://www.nuget.org/packages/FluentCommand.Dapper/) |
1312
| [FluentCommand.SqlServer](https://www.nuget.org/packages/FluentCommand.SqlServer/) | [![FluentCommand.SqlServer](https://img.shields.io/nuget/v/FluentCommand.SqlServer.svg)](https://www.nuget.org/packages/FluentCommand.SqlServer/) |
1413
| [FluentCommand.Json](https://www.nuget.org/packages/FluentCommand.Json/) | [![FluentCommand.Json](https://img.shields.io/nuget/v/FluentCommand.Json.svg)](https://www.nuget.org/packages/FluentCommand.Json/) |
1514

@@ -133,23 +132,6 @@ session
133132
priorities = q.Query<Priority>().ToList();
134133
});
135134
```
136-
## Dapper
137-
138-
PM> Install-Package FluentCommand.Dapper
139-
140-
Use Dapper to materialize data reader to entities
141-
142-
```c#
143-
144-
string email = "[email protected]";
145-
string sql = "select * from [User] where EmailAddress = @EmailAddress";
146-
147-
var session = configuration.CreateSession();
148-
var user = await session
149-
.Sql(sql)
150-
.Parameter("@EmailAddress", email)
151-
.QuerySingleAsync<User>();
152-
```
153135

154136
## Query Builder
155137

@@ -165,7 +147,7 @@ var user = await session
165147
.Select<User>() // table name comes from type
166148
.Where(p => p.EmailAddress, email)
167149
)
168-
.QuerySingleAsync();
150+
.QuerySingleAsync<User>();
169151
```
170152

171153
Count query
@@ -231,10 +213,9 @@ var deleteId = await session
231213

232214
### Source Generator
233215

234-
The project supports generating a DbDataReader from a class via an attribute. Add the `GenerateDataReaderAttribute` to a class to generate the needed extension methods.
216+
The project supports generating a DbDataReader from a class via an attribute. Add the `TableAttribute` to a class to generate the needed extension methods.
235217

236218
```c#
237-
[GenerateDataReader]
238219
[Table("Status", Schema = "dbo")]
239220
public class Status
240221
{
@@ -258,6 +239,17 @@ public class Status
258239
}
259240
```
260241

242+
Extension methods are generated to materialize data command to entities
243+
244+
```c#
245+
string email = "[email protected]";
246+
string sql = "select * from [User] where EmailAddress = @EmailAddress";
247+
var session = configuration.CreateSession();
248+
var user = await session
249+
.Sql(sql)
250+
.Parameter("@EmailAddress", email)
251+
.QuerySingleAsync<User>();
252+
```
261253

262254

263255
## SQL Server Features

src/FluentCommand.Generators/DataReaderFactoryGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class DataReaderFactoryGenerator : IIncrementalGenerator
1717
public void Initialize(IncrementalGeneratorInitializationContext context)
1818
{
1919
var provider = context.SyntaxProvider.ForAttributeWithMetadataName(
20-
fullyQualifiedMetadataName: "FluentCommand.GenerateDataReaderAttribute",
20+
fullyQualifiedMetadataName: "System.ComponentModel.DataAnnotations.Schema.TableAttribute",
2121
predicate: SyntacticPredicate,
2222
transform: SemanticTransform
2323
)
@@ -51,7 +51,7 @@ private static void Execute(SourceProductionContext context, EntityClass entityC
5151

5252
var source = DataReaderFactoryWriter.Generate(entityClass);
5353

54-
context.AddSource($"{qualifiedName}.DataReaderFactory.g.cs", source);
54+
context.AddSource($"{qualifiedName}DataReaderExtensions.g.cs", source);
5555
}
5656

5757
private static bool SyntacticPredicate(SyntaxNode syntaxNode, CancellationToken cancellationToken)

src/FluentCommand.Generators/DataReaderFactoryWriter.cs

Lines changed: 93 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ namespace FluentCommand.Generators;
44

55
public static class DataReaderFactoryWriter
66
{
7-
#if DEBUG
8-
private static int _counter = 0;
9-
#endif
10-
117
public static string Generate(EntityClass entityClass)
128
{
139
if (entityClass == null)
@@ -22,11 +18,6 @@ public static string Generate(EntityClass entityClass)
2218
.AppendLine("using global::FluentCommand.Extensions;")
2319
.AppendLine();
2420

25-
#if DEBUG
26-
// used to track re-writes for performance
27-
codeBuilder.AppendLine($"// Counter: {Interlocked.Increment(ref _counter)}");
28-
#endif
29-
3021
codeBuilder
3122
.Append("namespace ")
3223
.AppendLine(entityClass.EntityNamespace)
@@ -50,7 +41,7 @@ public static string Generate(EntityClass entityClass)
5041
.AppendLine("[global::System.Diagnostics.DebuggerStepThroughAttribute]")
5142
.Append("public static partial class ")
5243
.Append(entityClass.EntityName)
53-
.AppendLine("DataReaderFactoryExtensions")
44+
.AppendLine("DataReaderExtensions")
5445
.AppendLine("{")
5546
.IncrementIndent();
5647

@@ -85,8 +76,9 @@ private static void WriteQuerySingleEntityTask(IndentedStringBuilder codeBuilder
8576
.AppendLine("\"/> object.")
8677
.AppendLine("/// </summary>")
8778
.AppendLine("/// <param name=\"dataQuery\">The <see cref=\"T:FluentCommand.IDataQueryAsync\"/> for this extension method.</param>")
79+
.AppendLine("/// <param name=\"cancellationToken\">The cancellation instruction.</param>")
8880
.AppendLine("/// <returns>")
89-
.Append("/// A instance of <see cref=\"")
81+
.Append("/// A instance of <see cref=\"T:")
9082
.Append(entity.EntityNamespace)
9183
.Append(".")
9284
.Append(entity.EntityName)
@@ -97,17 +89,35 @@ private static void WriteQuerySingleEntityTask(IndentedStringBuilder codeBuilder
9789
.Append(".")
9890
.Append(entity.EntityName)
9991
.Append("> QuerySingle")
100-
.Append(entity.EntityName)
101-
.AppendLine("Async(this global::FluentCommand.IDataQueryAsync dataQuery)")
92+
.AppendLine("Async<TEntity>(")
10293
.IncrementIndent()
103-
.Append("=> global::FluentCommand.Internal.DataSequentialReader.QuerySingleAsync<")
94+
.AppendLine("this global::FluentCommand.IDataQueryAsync dataQuery,")
95+
.AppendLine("global::System.Threading.CancellationToken cancellationToken = default)")
96+
.Append("where TEntity : ")
10497
.Append(entity.EntityNamespace)
10598
.Append(".")
99+
.AppendLine(entity.EntityName)
100+
.DecrementIndent()
101+
.AppendLine("{")
102+
.IncrementIndent()
103+
.Append("return dataQuery.QuerySingleAsync<")
104+
.Append(entity.EntityNamespace)
105+
.Append(".")
106+
.Append(entity.EntityName)
107+
.AppendLine(">(")
108+
.IncrementIndent()
109+
.Append("factory: ")
106110
.Append(entity.EntityName)
107-
.Append(">(dataQuery, ")
111+
.Append("DataReaderExtensions.")
108112
.Append(entity.EntityName)
109-
.AppendLine("Factory);")
113+
.AppendLine("Factory,")
114+
.AppendLine("commandBehavior: global::System.Data.CommandBehavior.SequentialAccess |")
115+
.AppendLine(" global::System.Data.CommandBehavior.SingleResult |")
116+
.AppendLine(" global::System.Data.CommandBehavior.SingleRow,")
117+
.AppendLine("cancellationToken: cancellationToken);")
118+
.DecrementIndent()
110119
.DecrementIndent()
120+
.AppendLine("}")
111121
.AppendLine();
112122
}
113123

@@ -123,6 +133,7 @@ private static void WriteQueryEntityTask(IndentedStringBuilder codeBuilder, Enti
123133
.AppendLine("\"/> objects.")
124134
.AppendLine("/// </summary>")
125135
.AppendLine("/// <param name=\"dataQuery\">The <see cref=\"T:FluentCommand.IDataQueryAsync\"/> for this extension method.</param>")
136+
.AppendLine("/// <param name=\"cancellationToken\">The cancellation instruction.</param>")
126137
.AppendLine("/// <returns>")
127138
.Append("/// An <see cref=\"T:System.Collections.Generic.IEnumerable`1\" /> of <see cref=\"T:")
128139
.Append(entity.EntityNamespace)
@@ -134,18 +145,34 @@ private static void WriteQueryEntityTask(IndentedStringBuilder codeBuilder, Enti
134145
.Append(entity.EntityNamespace)
135146
.Append(".")
136147
.Append(entity.EntityName)
137-
.Append(">> Query")
138-
.Append(entity.EntityName)
139-
.AppendLine("Async(this global::FluentCommand.IDataQueryAsync dataQuery)")
148+
.AppendLine(">> QueryAsync<TEntity>(")
140149
.IncrementIndent()
141-
.Append("=> global::FluentCommand.Internal.DataSequentialReader.QueryAsync<")
150+
.AppendLine("this global::FluentCommand.IDataQueryAsync dataQuery,")
151+
.AppendLine("global::System.Threading.CancellationToken cancellationToken = default)")
152+
.Append("where TEntity : ")
142153
.Append(entity.EntityNamespace)
143154
.Append(".")
155+
.AppendLine(entity.EntityName)
156+
.DecrementIndent()
157+
.AppendLine("{")
158+
.IncrementIndent()
159+
.Append("return dataQuery.QueryAsync<")
160+
.Append(entity.EntityNamespace)
161+
.Append(".")
162+
.Append(entity.EntityName)
163+
.AppendLine(">(")
164+
.IncrementIndent()
165+
.Append("factory: ")
144166
.Append(entity.EntityName)
145-
.Append(">(dataQuery, ")
167+
.Append("DataReaderExtensions.")
146168
.Append(entity.EntityName)
147-
.AppendLine("Factory);")
169+
.AppendLine("Factory,")
170+
.AppendLine("commandBehavior: global::System.Data.CommandBehavior.SequentialAccess |")
171+
.AppendLine(" global::System.Data.CommandBehavior.SingleResult,")
172+
.AppendLine("cancellationToken: cancellationToken);")
148173
.DecrementIndent()
174+
.DecrementIndent()
175+
.AppendLine("}")
149176
.AppendLine();
150177
}
151178

@@ -162,7 +189,7 @@ private static void WriteQuerySingleEntity(IndentedStringBuilder codeBuilder, En
162189
.AppendLine("/// </summary>")
163190
.AppendLine("/// <param name=\"dataQuery\">The <see cref=\"T:FluentCommand.IDataQuery\"/> for this extension method.</param>")
164191
.AppendLine("/// <returns>")
165-
.Append("/// A instance of <see cref=\"")
192+
.Append("/// A instance of <see cref=\"T:")
166193
.Append(entity.EntityNamespace)
167194
.Append(".")
168195
.Append(entity.EntityName)
@@ -172,18 +199,33 @@ private static void WriteQuerySingleEntity(IndentedStringBuilder codeBuilder, En
172199
.Append(entity.EntityNamespace)
173200
.Append(".")
174201
.Append(entity.EntityName)
175-
.Append(" QuerySingle")
176-
.Append(entity.EntityName)
177-
.AppendLine("(this global::FluentCommand.IDataQuery dataQuery)")
202+
.AppendLine(" QuerySingle<TEntity>(")
178203
.IncrementIndent()
179-
.Append("=> global::FluentCommand.Internal.DataSequentialReader.QuerySingle<")
204+
.AppendLine("this global::FluentCommand.IDataQuery dataQuery)")
205+
.Append("where TEntity : ")
180206
.Append(entity.EntityNamespace)
181207
.Append(".")
208+
.AppendLine(entity.EntityName)
209+
.DecrementIndent()
210+
.AppendLine("{")
211+
.IncrementIndent()
212+
.Append("return dataQuery.QuerySingle<")
213+
.Append(entity.EntityNamespace)
214+
.Append(".")
215+
.Append(entity.EntityName)
216+
.AppendLine(">(")
217+
.IncrementIndent()
218+
.Append("factory: ")
182219
.Append(entity.EntityName)
183-
.Append(">(dataQuery, ")
220+
.Append("DataReaderExtensions.")
184221
.Append(entity.EntityName)
185-
.AppendLine("Factory);")
222+
.AppendLine("Factory,")
223+
.AppendLine("commandBehavior: global::System.Data.CommandBehavior.SequentialAccess |")
224+
.AppendLine(" global::System.Data.CommandBehavior.SingleResult |")
225+
.AppendLine(" global::System.Data.CommandBehavior.SingleRow);")
186226
.DecrementIndent()
227+
.DecrementIndent()
228+
.AppendLine("}")
187229
.AppendLine();
188230
}
189231

@@ -210,18 +252,32 @@ private static void WriteQueryEntity(IndentedStringBuilder codeBuilder, EntityCl
210252
.Append(entity.EntityNamespace)
211253
.Append(".")
212254
.Append(entity.EntityName)
213-
.Append("> Query")
214-
.Append(entity.EntityName)
215-
.AppendLine("(this global::FluentCommand.IDataQuery dataQuery)")
255+
.AppendLine("> Query<TEntity>(")
216256
.IncrementIndent()
217-
.Append("=> global::FluentCommand.Internal.DataSequentialReader.Query<")
257+
.AppendLine("this global::FluentCommand.IDataQuery dataQuery)")
258+
.Append("where TEntity : ")
259+
.Append(entity.EntityNamespace)
260+
.Append(".")
261+
.AppendLine(entity.EntityName)
262+
.DecrementIndent()
263+
.AppendLine("{")
264+
.IncrementIndent()
265+
.Append("return dataQuery.Query<")
218266
.Append(entity.EntityNamespace)
219267
.Append(".")
220268
.Append(entity.EntityName)
221-
.Append(">(dataQuery, ")
269+
.AppendLine(">(")
270+
.IncrementIndent()
271+
.Append("factory: ")
222272
.Append(entity.EntityName)
223-
.AppendLine("Factory);")
273+
.Append("DataReaderExtensions.")
274+
.Append(entity.EntityName)
275+
.AppendLine("Factory,")
276+
.AppendLine("commandBehavior: global::System.Data.CommandBehavior.SequentialAccess |")
277+
.AppendLine(" global::System.Data.CommandBehavior.SingleResult);")
278+
.DecrementIndent()
224279
.DecrementIndent()
280+
.AppendLine("}")
225281
.AppendLine();
226282
}
227283

@@ -235,7 +291,7 @@ private static void WriteEntityFactory(IndentedStringBuilder codeBuilder, Entity
235291
.Append(entity.EntityName)
236292
.AppendLine("\"/> objects from the current row in the specified <paramref name=\"dataRecord\"/>.")
237293
.AppendLine("/// </summary>")
238-
.AppendLine("/// <param name=\"dataRecord\">The open <see cref=\"T:System.Data.IDataRecord\"/> to get the object from.</param>")
294+
.AppendLine("/// <param name=\"dataRecord\">The open <see cref=\"T:System.Data.IDataReader\"/> to get the object from.</param>")
239295
.AppendLine("/// <returns>")
240296
.Append("/// A instance of <see cref=\"")
241297
.Append(entity.EntityNamespace)
@@ -249,7 +305,7 @@ private static void WriteEntityFactory(IndentedStringBuilder codeBuilder, Entity
249305
.Append(entity.EntityName)
250306
.Append(" ")
251307
.Append(entity.EntityName)
252-
.AppendLine("Factory(this global::System.Data.IDataRecord dataRecord)")
308+
.AppendLine("Factory(this global::System.Data.IDataReader dataRecord)")
253309
.AppendLine("{")
254310
.IncrementIndent()
255311
.AppendLine("if (dataRecord == null)")

0 commit comments

Comments
 (0)