c# - Argument type 'string' is not assignable to parameter type 'System.Collection.Generic.KeyValuePair<string,object>' -
so i'm refactoring old application, , made new sql helper class take on db work. contains 1 method , don't know why i'm getting error that's mentioned in title.
here's code:
public class helper { private static string connectionstring { { return configurationsettings.appsettings["connectionstring"]; } } public static dataset executedataset(string commandtext,params keyvaluepair<string,object>[] paramslist) { if (paramslist.length > 0) return helper.executedataset(connectionstring, commandtext, paramslist.select(s => new mysqlparameter(s.key, s.value)).toarray()); return helper.executedataset(connectionstring, commandtext); } }
executedataset
's paramslist
keyvaluepair
s, passing in string.
i'm not sure goal is, have infinite recursion @ point because every path recursively calls executedataset
before returns.
Comments
Post a Comment