问题
The following DTO generates a NullReferenceException when I click on the JSON link on the metadata page.
[DataContract]
[Route("/AVideo")]
[Route("/AVideo/{VideoID}/{Filename}")]
public class PlayerVideo : IReturnVoid
{
[DataMember]
public Guid VideoID { get; set; }
[DataMember]
public string Filename { get; set; } //dummy
}
If I change the return type to IReturn<int>
, the metadata page generates correctly.
回答1:
Looks like there's a pull request to fix this.
来源:https://stackoverflow.com/questions/17931815/ireturnvoid-generates-exception-on-metadata-page