Pregunta

I got some wcf service. I got also:

[DataContract]
public abstract class BaseClass
{

}

[DataContract]
public class ClassA : BaseClass
{
    [DataMember]
    //some data members
}

[DataContract]
public class ClassB : BaseClass
{
    [DataMember]
    //some data members
}

I got method

[OperationContract]

public void SendData(BaseClass[] data);

So i need to pass Array of ClassA and ClassB to my service. How should i mark my classes to make it visible in service metadata, and overall make that right?

¿Fue útil?

Solución

Look into KnownTypeAttribute.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top