银光+ WCF RIA +如何包含一组条件子记录(不是全部,而是一组)
我在通过 WCF RIA 和实体框架加载相关数据时遇到问题 - 请帮助我 - 我不知道如何解决它。
我有 Room <-- RoomRecords(包含 startDate/endDate 字段和对父 Room 的引用),并且我必须加载 RoomRecords,其中例如开始日期 >= 1.07.2010 和 endDate <= 15.07.2010。家长室也应包括在内。我在 Room 属性上使用 [Include] 属性加上 我正在使用这种方法 - '如何执行条件包含' - 来检索相关数据。
问题是,在客户端,我得到与所有 roomRecords 相关的房间(例如,开始/结束日期是去年的开始/结束日期 - 这不是我需要的 - 将会有很多记录!),但我需要获得与RoomRecords 仅包含符合所提及条件的开始/结束日期。有什么方法可以解决呢?谢谢你!
I've got a problem with loading related data via WCF RIA and Entity Framework - please help me - i don't know how to solve it.
I have Room <-- RoomRecords(contains startDate/endDate fields and reference to parent Room) and I have to load RoomRecords where e.g. start date >= 1.07.2010 and endDate <= 15.07.2010. Parent Room should also be included. I'm using [Include] attribute on Room property plus i'm using this approach - 'How to do a Conditional Include' - to retrieve related data.
The problem is that on client side i get Room with ALL roomRecords related (e.g. where start/end date are from past year - this is not what i need - there is will be a lot of records!) but i need to get Rooms with RoomRecords JUST with start/end date that suits by the condition mentioned. What is the way to solve it? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UPS!
看来我错了 - 一切正常,条件加载工作正常......请原谅!
查询:
Ups!
Seems like I was wrong - everything works fine and conditional loading is working properly... Pardon!
the query: