public IEnumerable <XMIoT.Framework.Attribute> GetOutputAttributes(string endpoint, IDictionary <string, string> parameters) { this.config = new Configuration() { Parameters = parameters }; if (UsingStoredProc) { return(SQLHelpers.GetStoredProcParams(this.SQLServer, this.SQLUser, this.SQLUseSQLAuth, this.SQLPassword, this.SQLDatabase, this.StoredProc) .Select(p => new XMIoT.Framework.Attribute(p.ParameterName.TrimStart(new char[] { '@' }), SQLHelpers.GetSystemType(p.DbType).GetIoTType()))); } else if (CreateTable == false) { return(SQLHelpers.GetColumns(this.SQLServer, this.SQLUser, this.SQLUseSQLAuth, this.SQLPassword, this.SQLDatabase, this.SQLTable) .Select(col => new XMIoT.Framework.Attribute(col.ColumnName, col.DataType.GetIoTType()))); } else { return(ParentOutputs); } }
public IEnumerable <XMIoT.Framework.Attribute> GetOutputAttributes(string endpoint, IDictionary <string, string> parameters) { this.config = new Configuration() { Parameters = parameters }; if (UsingStoredProc) { var outputs = SQLHelpers.GetStoredProcParams(this.SQLServer, this.SQLUser, this.SQLUseSQLAuth, this.SQLPassword, this.SQLDatabase, this.StoredProc) .Where(p => p.Direction != ParameterDirection.Input) .Select(p => new XMIoT.Framework.Attribute(p.ParameterName.TrimStart(new char[] { '@' }), SQLHelpers.GetSystemType(p.DbType).GetIoTType())); if (ReturnType == "Append") { outputs = outputs.Union(ParentOutputs); } return(outputs); } else { return(ParentOutputs); } }