Пример #1
0
        public void AddParameterSetToCache(
            string connectionString,
            IDbCommand command,
            IDataParameter[] parameters)
        {
            string commandText = command.CommandText;

            this.paramCache[(object)CachingMechanism.CreateHashKey(connectionString, commandText)] = (object)parameters;
        }
Пример #2
0
 public bool IsParameterSetCached(string connectionString, IDbCommand command)
 {
     return(this.paramCache[(object)CachingMechanism.CreateHashKey(connectionString, command.CommandText)] != null);
 }
Пример #3
0
        public IDataParameter[] GetCachedParameterSet(
            string connectionString,
            IDbCommand command)
        {
            string commandText = command.CommandText;

            return(CachingMechanism.CloneParameters((IDataParameter[])this.paramCache[(object)CachingMechanism.CreateHashKey(connectionString, commandText)]));
        }