forked from subsonic/SubSonic-3.0
-
Notifications
You must be signed in to change notification settings - Fork 1
/
QueryCommand.cs
33 lines (26 loc) · 1.11 KB
/
QueryCommand.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) Microsoft Corporation. All rights reserved.
// This source code is made available under the terms of the Microsoft Public License (MS-PL)
//Original code created by Matt Warren: http://iqtoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=19725
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Common;
using System.Data;
namespace SubSonic.Linq.Structure
{
public class QueryCommand<T>
{
public List<string> ColumnNames = new List<string>();
public QueryCommand(string commandText, IEnumerable<string> paramNames, Func<DbDataReader, T> projector,List<string> ColumnNames)
{
CommandText = commandText;
ParameterNames = new List<string>(paramNames).AsReadOnly();
Projector = projector;
this.ColumnNames = ColumnNames;
}
public string CommandText { get; private set; }
public ReadOnlyCollection<string> ParameterNames { get; private set; }
public Func<DbDataReader, T> Projector { get; private set; }
}
}