Ejemplo n.º 1
0
        /// <summary>
        /// Constructs the function by defining the parameters
        /// </summary>
        /// <param name="connectionRepository">The connection repository</param>
        public ExecuteStoredProcedureFunction
        (
            IDbConnectionRepository connectionRepository
        )
        {
            Validate.IsNotNull(connectionRepository);

            DefineRequiredParameter
            (
                "ConnectionName",
                "The database connection name.",
                typeof(string)
            );

            DefineRequiredParameter
            (
                "ProcedureName",
                "The name of the stored procedure to execute.",
                typeof(string)
            );

            _connectionRepository = connectionRepository;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs the function by defining the parameters
        /// </summary>
        /// <param name="connectionRepository">The connection repository</param>
        public ExecuteQueryFunction
        (
            IDbConnectionRepository connectionRepository
        )
        {
            Validate.IsNotNull(connectionRepository);

            DefineRequiredParameter
            (
                "ConnectionName",
                "The database connection name.",
                typeof(string)
            );

            DefineRequiredParameter
            (
                "SQL",
                "The SQL query to execute.",
                typeof(string)
            );

            _connectionRepository = connectionRepository;
        }