The SqlHelper class provides three shared methods that you can use to manage SqlParameter parameters. Here are one by one explanations:
1, CacheParameterSet
Storing the SqlParameter parameter array in the local cache
2, Getcacheparameterset
Used to read the SqlParameter array in the cache, and use the CacheParameterSet combination above
3, Getspsqlparameter
An overloaded method that retrieves the corresponding parameters in the specified stored procedure (first querying the database once and then caching the results for future queries), which retrieves the parameters of the stored procedure from the cache, and if not, retrieves from the. NET SqlCommandBuilder class from the inside, and add them to the cache for subsequent retrieval requests. Then, specify the appropriate parameter settings for each parameter (set the parameter value to DBNull.Value), and finally return the parameters to the client as an array.
Introduction to the usage of SqlHelperParameterCache class in SqlHelper