实体数据源和动态数据,其中params [英] EntityDataSource and Dynamic Data, Where params

查看:72
本文介绍了实体数据源和动态数据,其中params的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。我在网上做了很多搜索,无法找到解决方案。我是EF的新手,所以请耐心等待我...

我使用动态数据和ADO.Net Entity Framework作为数据模型。我正在显示从EF数据源中提取的[Request]对象列表。使用动态数据DynamicControlParameter定义EF数据源上的过滤器。

我想做的是在父关系值上添加另一个过滤器。即[Request]对象与[Member]有FK关系,[Member]有一个"Rating"对象。属性。除了动态数据过滤器之外,我想过滤Rating属性上的所有结果。

如何过滤此父关系属性?

我尝试添加WhereParameter on"Member.Rating"但这不起作用。

请告知。

解决方案

你好,

我我不确定DynamicControlParameter是否允许同一集合中的其他参数。我向动态数据团队的某个人提出了这个问题。

在任何情况下,如果您提供了更多详细信息,特别是数据源控件的标记和例外,如果您看到一个,将会有所帮助。

谢谢,<登记/>迭

Hi guys. I've done a lot of searching on the net and cant find a solution for this. I am new to EF so please bear with me...

I am using Dynamic Data with ADO.Net Entity Framework as the data model. I'm displaying a list of [Request] objects, pulled from the EF data source
Filters on the EF data source are defined using the dynamic data DynamicControlParameter.

What I want to do is add another filter on a parent relationship value. I.e. the [Request] object has a FK relationship to [Member], and [Member] has a "Rating" property. I want to filter all results on the Rating property, in addition to the Dynamic Data filters.

How do I filter on this parent relationship property?

I tried adding a WhereParameter on "Member.Rating" but this is not working..

Please advise.

解决方案

Hello,

I am not sure whether DynamicControlParameter allows other parameters in the same collection. I have fowarded the question to someone on the Dynamic Data team.

In any case, it would help if you provided more details, in particular the markup for the data source controls and the exception if you are seeing one.

Thanks,
Diego


这篇关于实体数据源和动态数据,其中params的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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