示例#1
0
 // Supressing this as we pass sprocname from constant at all times
 public static IDbCommand GetCommandWithParameters <T>(this IDbCommand command, T entity, Dictionary <string, object> sqlParametersDictionary, string sprocName)
 {
     command.CommandType    = CommandType.StoredProcedure;
     command.CommandText    = sprocName;
     command.CommandTimeout = IDbCommandExtensions.ZerochaosStandardTimeout;
     command = SProcParamUtility.GenerateSQLParams(command, sprocName, entity, sqlParametersDictionary);
     return(command);
 }
示例#2
0
 // Supressing this as we pass sprocname from constant at all times
 public static IDbCommand GetCommandWithParameters <T>(this IDbCommand command, T entity, string sprocName, bool isBatchOperation = false)
 {
     command.CommandType    = CommandType.StoredProcedure;
     command.CommandText    = sprocName;
     command.CommandTimeout = IDbCommandExtensions.ZerochaosStandardTimeout;
     command = SProcParamUtility.GenerateSQLParams(command, sprocName, entity, null, isBatchOperation);
     return(command);
 }