I'm trying to populate a collection from IDataReader that was returned by another method ... for some reason, it keeps throwing "No parameterless constructor defined for this object". error for this line:
List<string> names = CBO.FillCollection<string>(DataProvider.Instance().ExecuteReader("getNames", new SqlParameter("UserId", 1)));
I tried to separate the parameters so things get initialized separately until I had this:
List<string> names = CBO.FillCollection<string>(nameDataReader);
and I still got the error on one line.
Any ideas?
source
share