When executing the following query, I get the error:
The specified cast from a materialized \'System.Int32\' type to the \'System.Double\' type is n
I think the data type of the columns inside your database table is Int32 but your data model has double. You need to change the data types of your data models to int. By materialized it means the type it got when it ran the query on the database.
Int32
double
int
materialized