var accState = from obj in this.DataWorkspace.FF_DataExtractData.stg_auto_operators
join avo in this.DataWorkspace.FF_DataExtractData.stg_auto_veh_oper_assns on obj.etl_sequence_number equals avo.operator_seq_nbr
join pu in this.DataWorkspace.FF_DataExtractData.punits on avo.operator_seq_nbr equals pu.c59_id
select pu.a02_state;
Error: Could not find an implementation of the query pattern for source type 'Microsoft.LightSwitch.Framework.EntitySet'. 'Join' not found. Consider explicitly specifying the type of the range variable 'obj'.
我希望通过这个LINQ获得state的值,
operator_seq_nbr,c59_id和etl_sequenceNumber属于LONG类型,
a02_state是字符串类型 .
1 回答
Lightswitch只允许您作为查询结果返回完整实体,您无法重塑数据 . 因此,选择单个字段(在这种情况下为pu.a02_state)无效 . 无法重塑的逻辑扩展是JOIN无效,因为存在允许您组合来自不同实体的字段 .
您可以使用Lambda语法返回一组符合条件的实体 . 但是您的查询没有任何选择标准,即使您希望返回单个值 . 你能澄清一下数据和意图吗?