src/WeText.Common/Querying/TableDataGateway.cs
/// <summary>
/// Gets a list of database parameters for constructing the selection criteria clause.
/// </summary>
/// <typeparam name="T">The type of the object.</typeparam>
/// <param name="parameterValues">The <c>Dictionary&lt;string, object&gt;</c> instance which contains the criteria.</param>
/// <returns>The list of database parameters.</returns>
Gets a list of database parameters for constructing the selection criteria clause.
Gets a list of database parameters for constructing the selection criteria clause .
protected virtual List<DbParameter> GetSelectCriteriaDbParameterList<T>(Dictionary<string, object> parameterValues)
            where T : class, new()
        {
            List<DbParameter> collection = new List<DbParameter>();
            foreach (var kvp in parameterValues)
            {
                DbParameter param = CreateParameter();
                param.ParameterName = kvp.Key;
                param.Value = kvp.Value;
                collection.Add(param);
            }
            return collection;
        }
protected virtual List < DbParameter > GetSelectCriteriaDbParameterList < T > ( Dictionary < string , object > parameterValues ) where T : class , new ( ) { List < DbParameter > collection = new List < DbParameter > ( ) ; foreach ( var kvp in parameterValues ) { DbParameter param = CreateParameter ( ) ; param . ParameterName = kvp . Key ; param . Value = kvp . Value ; collection . Add ( param ) ; } return collection ; }
Gets a list of database parameters for constructing the selection criteria clause.
Gets a list of database parameters for constructing the selection criteria clause .
The list of database parameters.
The list of database parameters .
parameterValues
Dictionary<string, object>
None
typeparam
The type of the object.
The type of the object .