views:

59

answers:

1

I can't make this seemingly simple call on my DomainService compile. I keep getting 'Operation named 'ComposeNewOrder' does not conform to the required signature. Parameter types must be an entity type or one of the predefined serializable types.'

Am I missing something here, should I be doing it in another way or is it just unsupported? (I'm using WCF RIA services 1.0 for VS2010)

public class ComposedOrder
{
    [Key]
    public Order Order { get; set; }
    public OrderPart[] Parts { get; set; }
}
public class MyDomainService{
    ...
    [Invoke]
    public void ComposeNewOrder(ComposedOrder co)
    {
      //implementation
    }
    ...
}

I have CRUD operations defined for Order and OrderPart which are entities from my EntityFramework model.

+1  A: 

Invoke operations cannot take Entity types (such as your ComposedOrder) as parameters. You can only use data types, such as int, string etc. You could pass in the key of your ComposedOrder and load it using that.

krolley

related questions