给定以下 DTO:
[DataContract]
public class Foo
{
[DataMember]
public string Boo { get; set; }
[DataMember]
public string Far { get; set; }
}
[DataContract]
public class Bar
{
[DataMember]
public Foo Test { get; set; }
// other members
}
我想添加一条路线,例如:
Add<Bar>("/...(other members).../{Test.Boo}/{Test.Far}/
这可能吗?如果是这样,情况将如何变化?
[DataMember]
public Foo Test { get; set; }
改为:
[DataMember]
public Foo[] Test { get; set; }
?