Wcf inhereted models
Posted
by jack london
on Stack Overflow
See other posts from Stack Overflow
or by jack london
Published on 2010-04-27T11:46:49Z
Indexed on
2010/04/27
16:13 UTC
Read the original article
Hit count: 284
wcf
[DataContract]
Base
{
[DataMember]
public int Id {get;set;}
}
[DataContract]
A : Base
{
[DataMember]
public string Value {get;set;}
}
[ServiceContract]
interface IService
{
[OperationContract]
void SetValue (Base base);
}
is there a way to use the service like the following style:
new Service ().SetValue (new A ());
© Stack Overflow or respective owner