Пример #1
0
 public void AddRange(SEDbCommandParameterCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
Пример #2
0
        public object ExecuteScalar(CommandType commandType, string commandText, SEDbCommandParameterCollection parameters)
        {
            DbCommand dbCmd;

            switch (commandType)
            {
            case CommandType.Text:
                dbCmd = _database.GetSqlStringCommand(commandText);
                break;

            case CommandType.StoredProcedure:
                dbCmd = _database.GetStoredProcCommand(commandText);
                break;

            default:
                dbCmd = null;
                break;
            }
            if (parameters != null)
            {
                foreach (SEDbCommandParameter parameter in parameters)
                {
                    SqlParameter par = new SqlParameter();
                    par.ParameterName = parameter.Name;
                    par.Value         = parameter.Value;
                    dbCmd.Parameters.Add(par);
                }
            }
            return(_database.ExecuteScalar(dbCmd));
        }
Пример #3
0
 public DataItemEntityEnumerator(SEDbCommandParameterCollection mappings)
 {
     this.temp           = ((IEnumerable)(mappings));
     this.baseEnumerator = temp.GetEnumerator();
 }
Пример #4
0
 public SEDbCommandParameterCollection(SEDbCommandParameterCollection value)
 {
     this.AddRange(value);
 }