我正在尝试使用 Mvc5 从空列表中读取空日期时间
List<TelecomPayments> telPayments =
db.TelecomPayments
.Where(t => t.TelecomAdmin.TelecomAdminID == telecomAdmin.TelecomAdminID)
.ToList();
telPayments.FirstOrDefault();
DateTime? lastDate = telPayments.FirstOrDefault().ToDate;
if (lastDate == null)
{
if (telPayments.Count == 0)
{
}
}
这是我在控制器中指定的,但仍然通过补偿
白衣非少年
慕标5832272
相关分类