wcf ria services complex type parameters
October 8, 2011 at 12:07 AM
—
dsoltesz
I always seem to forget how to get complex types to work as parameters in wcf ria services sp1. You first have to make sure you expose your complex type as an IEnumerable
public IQueryable<MyComplexType> ExposeComplexType()
{
//stub to expose complex type to client
throw new NotSupportedException();
}
Then in order to use the complex type as a parameter, you have to mark your domain service method with the Invoke attribute
[Invoke]
public IEnumerable<SomeEntity> QueryMyEntity(MyComplexType param)
{ return myObjects;}