IReturnVoid 在元数据页面上生成异常 [英] IReturnVoid generates exception on metadata page
本文介绍了IReturnVoid 在元数据页面上生成异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我单击元数据页面上的 JSON 链接时,以下 DTO 会生成 NullReferenceException.
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
}
如果我将返回类型更改为 IReturn
,元数据页面会正确生成.
If I change the return type to IReturn<int>
, the metadata page generates correctly.
推荐答案
看起来有一个 pull 请求 来解决这个问题.
Looks like there's a pull request to fix this.
这篇关于IReturnVoid 在元数据页面上生成异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文