示例#1
0
        public static SqlCommand CallsSproc(this SqlCommand cmd, DbObjectName function)
        {
            if (cmd == null)
            {
                throw new ArgumentNullException(nameof(cmd));
            }
            if (function == null)
            {
                throw new ArgumentNullException(nameof(function));
            }

            cmd.CommandText = function.QualifiedName;
            cmd.CommandType = CommandType.StoredProcedure;

            return(cmd);
        }
示例#2
0
 protected bool Equals(DbObjectName other)
 {
     return(GetType() == other.GetType() &&
            string.Equals(QualifiedName, other.QualifiedName, StringComparison.OrdinalIgnoreCase));
 }