Ejemplo n.º 1
0
        /// <summary>
        /// Starts a new script where multiple statements can be executed within the same command
        /// and sets the first statement to the specified query
        /// </summary>
        /// <param name="query">The first statement in the script</param>
        /// <returns>A new DBScript for statement chaining</returns>
        public static DBScript Begin(DBStatement query)
        {
            DBScript s = Begin();

            s.Then(query);
            return(s);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Starts a new script where the provided multiple statements can be executed within the same command
        /// </summary>
        /// <param name="querys">The statements in the script</param>
        /// <returns>A new DBScript for statement chaining</returns>
        public static DBScript Begin(params DBStatement[] querys)
        {
            DBScript s = Begin();

            if (null != querys && querys.Length > 0)
            {
                foreach (DBQuery q in querys)
                {
                    s.Then(q);
                }
            }

            return(s);
        }