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); }
protected bool Equals(DbObjectName other) { return(GetType() == other.GetType() && string.Equals(QualifiedName, other.QualifiedName, StringComparison.OrdinalIgnoreCase)); }