将带有嵌套对象的对象传递给我的ASP.NET Web API GET方法的URL语法是什么?这可能吗? http://mydomain/mycontroller?...
传递嵌套复杂类型的REST URL语法是什么?
myController的GET方法:
public void Get([FromUri]MyType myType) { ... }
C#类型:
public class MyType
{
public string Name { get; set; }
public NestedType Foo { get; set; }
}
public class NestedType
{
public int Bar { get; set; }
}
这看起来像一个有趣的相关讨论:http://stackoverflow.com/questions/7104578/rest-complex-composite-nested资源 – JayC