I have a dictionary like the following:
Dictionary<string,SP> dict;
that contains a string and a SP object.
I would like to do the following
dict = conn.Query("SELECT routine_name,created,modified FROM PROCEDURES").toDictionary (
row => (string)row.Routine_Name,
row => new SP (Name=row.Routine_Name,Created=row.created,Modified=row.modified));
The above code is not working. How can I create a SP object with the above information. I have a constructor that takes these three parameters.
Create proper model
Map your query to model properties, select it to dictionary