Example #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);
 }
Example #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);
 }
        /// <summary>
        /// Gets the Stored Procedure parameters xml document
        /// </summary>
        /// <returns></returns>
        public static XDocument GetSprocParamsXMLDocument()
        {
            SProcParamUtility obj = new SProcParamUtility();

            return(XDocument.Load(obj.GetResourceStream("SprocParameterMapper.xml")));
        }