You are going to need to create a class and map the columns that returns your query with primitive data type properties declared in that class,eg:
// SQL version of the above LINQ code.
string query = "SELECT EnrollmentDate, COUNT(*) AS StudentCount "
+ "FROM Person "
+ "WHERE Discriminator = 'Student' "
+ "GROUP BY EnrollmentDate";
IEnumerable<EnrollmentDateGroup> data = db.Database.SqlQuery<EnrollmentDateGroup>(query);
And your class would be something like this:
public class EnrollmentDateGroup
{
public int StudentCount {get;set;}
public DateTime EnrollmentDate {get;set;}
}
You can find the list of primitive data types you can use to map Microsoft SQL Server data types in this link
objectandToString()them. It's a little unclear as to what you're trying to achieve.