Service stack arrayof to be removed
问题 I have my dto defined as [DataContract(Name = "Tuner", Namespace = "")] public class TunerDto { [DataMember(Name = "TunerName", Order = 1)] public string TunerName { get; set; } } and I am returning an array of theses which gives my XML in the body as: <ArrayOfTuner> <Tuner> <Name>Test1</Name> </Tuner> ... </ArrayOfTuner> Is there a way of replacing ArrayOfTuner with Tuners instead? 回答1: You should wrap your array in a class, so you can add a [CollectionDataContract] attribute to modify the