我收到错误
不能隐式转换类型“int?” 到'system.collections.generic.list?
有人可以帮我吗?
internal class PatchDetails
{
internal List<int> ServerID { get; set; }
internal List<string> PatchStatus { get; set; }
}
class Program
{
void PatchQueue()
{
List<PatchDetails> patchinfo = new List<PatchDetails>();
using (PatchEntities server = new PatchEntities())
{
patchinfo = (from patches in server.AppPM_Patches
where patches.PatchStatus == "Started"
|| patches.PatchStatus == "NotStarted"
select new PatchDetails { ServerID = patches.ServerId, PatchStatus = patches.PatchStatus }).ToList();
}
}
}