次の方法で共有


Developing an OData consumer for the Windows Phone 7

A couple of days back at Mix we announced the CTP release of the OData Client Library for Windows Phone 7 series.

Cool stuff undoubtedly.

But how do you use it?

Well Phani, a Data Services team member, shows you how on his blog.

Comments

  • Anonymous
    June 25, 2010
    Any word on when the next drop of the OData client for WP7 will be? I've found a few blocking issues that don't exist in the Silverlight 4 OData libraries that is preventing us from using the WP7 version. Thanks.
  • Anonymous
    July 04, 2010
    Same here. The LoadAsync is crashing all the time I give a more complex linq query to it.Very bad so that I can't do any selection of data - only returning the complete feed is working,query.Expression=Expression:[10000].Where(o => (o.Mahlzeit = value(MyDietLogWP7.ModelHandler+<>c__DisplayClass0).mahlzeit))A first chance exception of type 'System.MethodAccessException' occurred in mscorlib.dllA first chance exception of type 'System.MethodAccessException' occurred in System.Data.Services.Client.dllError:System.MethodAccessException: MethodAccessException  at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)  at System.Activator.InternalCreateInstance(Type type, BindingFlags invokeAttr, Binder binder, Object[] args, CultureInfo culture, StackCrawlMark& stackMark)  at System.Activator.CreateInstance(Type type, Object[] args)  at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.Constant(ConstantExpression c)  at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.Build(Expression exp)  at IQToolkit.ExpressionEvaluator.EvaluatorBuilder.MemberAccess(MemberExpression m
  • Anonymous
    July 08, 2010
    Shalan007, that is exactly the issue I found as well. It pretty much makes OData unusable on WP7 right now. Note, hardcoding your filter works .Where(item => item.name == "hardcodedstring")Of course how often does your data NOT reside in a variable!?
  • Anonymous
    July 08, 2010
    I found a workaround in case anyone cares: use CreateQuery and AddQueryOption instead. You end up with a bunch of ugly strings as opposed to nice clean, strongly-typed LINQ, but it works! Hopefully the OData team will release an update soon.
  • Anonymous
    October 01, 2010
    The comment has been removed