Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
What's stopping you? The contract will look like this:
[ServiceContract]
public interface IService
{
[OperationContract]
List<MyClass> GetMyClassList();
}
[DataContract]
public class MyClass
{
[DataMember]
public int Id { get; set; }
}
Все так и сделано, list передается, но каждый раз приходится править reference на клиенте. Структура такая:
[DataContract]
public abstract class A
{
[DataMember]
public int Id{get;set}
[DataMember]
public string Name{get;set;}
protected A(int id,string name )
{
Id = id;
Name = name;
}
public abstract Set(...);
public abstract Get(...);
}
List<A>
which contains all classes inherited from ADidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question