public EdmEntityObjectCollection Get(IEdmCollectionType collectionType, ODataQueryOptions queryOptions) { var sql = _sqlQueryBuilder.ToSql(queryOptions); using (var connection = new SqlConnection(_connectionString)) { var cmd = new CommandDefinition(sql.Query, sql.Parameters, commandType: CommandType.Text); IEnumerable <IDictionary <string, object> > rows = connection .Query <dynamic>(cmd) .Cast <IDictionary <string, object> >(); var collection = _resultTransformer.Translate(rows, collectionType); return(collection); } }