使用 odata netflix 查询返回演员成员
当我按类型和评级请求标题时,我试图获取电影中的演员列表。
我用: 暗淡目录项 = (对于流派中的 g 对于 g.titles 中的 t 其中 t.genre =“西部片” 其中 t. rating >=4 select t).Take(100)
这很好用,但我也想要这些电影的演员。如何更改此查询以包括返回演员?
非常感谢您的帮助。
谢谢托尼
I am trying to get the list of cast members in a movie when I request titles by genre and ratings.
I use:
dim catalogitem =
(For g in Genre
For t in g.titles
Where t.genre = "Westerns"
Where t.rating >=4
select t).Take(100)
This works great, but I also want the cast members of these movies. How do I change this query to include returning the cast members also?
Your help is greatly appreciated.
Thanks
Tony
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道您可以使用 OData URI 扩展转换:
从此页面:
http://blogs.msdn.com/b/bethmassi/archive/2011/02/16/fun-with-odata-and-windows-phone-7.aspx
看起来像您需要做的是在定义请求的 URL 时定义展开:
因此对于您的情况:
Dim url = String.Format("/Genres('{0}')?$expand=Cast", Me.textBox1.Text)
请注意,您还需要更改查询以询问演员:
I know that you can expand cast using the OData URI:
From this page:
http://blogs.msdn.com/b/bethmassi/archive/2011/02/16/fun-with-odata-and-windows-phone-7.aspx
It looks like what you need to do is define the expand when you're defining the URL for the request:
So for your case:
Dim url = String.Format("/Genres('{0}')?$expand=Cast", Me.textBox1.Text)
Note that you'll also need to change your query to ask for the Cast: