I have the following query and code running and I want the two columns returned on a KeyValuePair. I see the total row returned is right but all the keyvaluepairs are nul !
string query = @"Select id,name from persons";
var persons = context.Database.SqlQuery<KeyValuePair<string,string>>(query);
I have seen an answer saying that I have to create a class to get the result; but my question is can't I get the result on KeyValuePair ? Or I must have a class defined with properties matched ?