无法在预处理查询中正确使用LINQ(选择将引发摇摆!) [英] Unable to use LINQ properly in Pre Process Query (Select throws a wobbler!)

查看:81
本文介绍了无法在预处理查询中正确使用LINQ(选择将引发摇摆!)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要么我做错了,要么这是一个很愚蠢的限制....

Either I'm doing it wrong, or this is a rather silly limitation....

在表格查询的PreporcessQuery部分中,我不能执行以下操作:

In a Table Query, PreporcessQuery part, I CANT do the following:

 

  Private Sub VisibleIncidentReports_PreprocessQuery(ByRef query As System.Linq.IQueryable(Of LightSwitchApplication.IncidentReport))

   'We only want the incident reports for the entities a user is actually allowed to see. The linking table is UserEntities
   'This table links Username to EntityId.
   'An incident report always belongs to an EntityId

   Dim allIds2 = (From ue In UserEntities Where ue.UserName = Application.Current.User.Name Select ue.EntityId).Execute().ToList

   query = From ir In query
     Where allIds2.Contains(ir.Entityy.Id)
     Select ir
  End Sub

推荐答案

Hi

不可能选择查询Lightswitch中的字段,但要选择每个屏幕中的控件列表.

It is not possible to select fields in a query Lightswitch, but if the list of controls within each screen.

Jaime


这篇关于无法在预处理查询中正确使用LINQ(选择将引发摇摆!)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆