I have a WCF RIA domain service that contains a method that I would like to call when the user clicks a button:
[Invoke] public MyEntity PerformAnalysis(int someId) { return new MyEntity(); }
However, when I try to compile, I get the following error:
Operation named 'PerformAnalysis' does not conform to the required signature. Return types must be an entity, collection of entities, or one of the predefined serializable types.
The thing is, as far as I can tell, MyEntity is an entity:
[Serializable] public class MyEntity: EntityObject, IMyEntity { [Key] [DataMember] [Editable(false)] public int DummyKey { get; set; } [DataMember] [Editable(false)] public IEnumerable<SomeOtherEntity> Children { get; set; } }
I suppose I am missing something simple here. Can someone please tell me how can I create an invokable method that returns a single MyEntity object?
source share