Reputation: 13
When I use several List<T>
as request,several List
1` appeared on the metadata page. So this is not unique and can not view the operation.
Routes.Add<List<Class1>>("/Class1/BatchSave")
.Add<List<Class2>>("/Class2/BatchSave")
.Add<List<Class3>>("/Class3/BatchSave");
But the operation names on the metadata page are all List
1`. When I view the operation detail, it's throw an Exception.
Upvotes: 1
Views: 65
Reputation: 143319
You can only register Request DTOs on routes, e.g:
Routes.Add<Class1>("/Class1/BatchSave")
.Add<Class2>("/Class2/BatchSave")
.Add<Class3>("/Class3/BatchSave");
Although Request DTOs can inherit collections, e.g:
public class Class1 : List<string> { }
Upvotes: 1