|
4 | 4 |
|
5 | 5 | namespace Shuttle.Core.Data |
6 | 6 | { |
7 | | - public class ProcedureQuery : IQuery |
| 7 | + public class ProcedureQuery : IQueryParemeter |
8 | 8 | { |
9 | | - private readonly Dictionary<IMappedColumn, object> parameterValues; |
10 | | - private readonly string procedure; |
| 9 | + private readonly Dictionary<IMappedColumn, object> _parameterValues; |
| 10 | + private readonly string _procedure; |
11 | 11 |
|
12 | 12 | public ProcedureQuery(string procedure) |
13 | 13 | { |
14 | | - this.procedure = procedure; |
15 | | - parameterValues = new Dictionary<IMappedColumn, object>(); |
| 14 | + _procedure = procedure; |
| 15 | + _parameterValues = new Dictionary<IMappedColumn, object>(); |
16 | 16 | } |
17 | 17 |
|
18 | 18 | public void Prepare(IDbCommand command) |
19 | 19 | { |
20 | 20 | Guard.AgainstNull(command, "command"); |
21 | 21 |
|
22 | | - command.CommandText = procedure; |
| 22 | + command.CommandText = _procedure; |
23 | 23 | command.CommandType = CommandType.StoredProcedure; |
24 | 24 |
|
25 | | - foreach (var pair in parameterValues) |
| 25 | + foreach (var pair in _parameterValues) |
26 | 26 | { |
27 | 27 | command.Parameters.Add(pair.Key.CreateDataParameter(command, pair.Value)); |
28 | 28 | } |
29 | 29 | } |
30 | 30 |
|
31 | 31 | public IQuery AddParameterValue(IMappedColumn column, object value) |
32 | 32 | { |
33 | | - parameterValues.Add(column, value); |
| 33 | + _parameterValues.Add(column, value); |
34 | 34 |
|
35 | 35 | return this; |
36 | 36 | } |
|
0 commit comments