System.Data.Common.DbCommand.Select(System.Func)

Here are the examples of the csharp api class System.Data.Common.DbCommand.Select(System.Func) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

View license
IEnumerable<string> GetPrimaryKey(string table)
        {
            using (var cmd = this._factory.CreateCommand())
            {
                cmd.Connection = this._connection;
                cmd.CommandText = PrimaryKeySql;

                var p = cmd.CreateParameter();
                p.ParameterName = "@tableName";
                p.Value = table;
                cmd.Parameters.Add(p);

                return cmd.Select(c => (string)c["ColumnName"]).ToList();
            }
        }

2. Example

View license
List<ForeignKey> LoadForeignKeys(Table tbl)
        {
            using (var cmd = this._facto/n ..... /n //View Source file for more details /n }