我使用AutoMapper,我的模型(使用EntityFramework)需要DateTime属性,但是我的POCOs使用可以为空的DateTime。有没有办法将DateTime转换为具有不同属性名的可空DateTime?我试过了,但不起作用:Property 'Int32 Year' is not defined for type 'System.Nullable'1[Sys
这是我第一次遇到这种情况--当然这不是很重要,但我仍然需要咨询集体,因为我的搜索表明这是可以做到的,但我无法解决它。private int? _PageNumber = null;
CS0037: Cannot convert null to 'int' because it is a non-nullable value type
所以我想如果我不能改变类