vmSubTasks = vmTask.SubTasks == null
? null
: (from t in vmTask.SubTasks
where t != null
select new TaskViewModel(t, this))
.ToList<taskviewmodel>();</taskviewmodel>
or
vmSubTasks = vmTask.SubTasks == null
? null
: vmTask.SubTasks
.Where(t => t != null)
.Select new TaskViewModel(t, this)
.ToList<taskviewmodel>();</taskviewmodel>
Note that in your code snippet you are creating a list twice. The first is passed to the constructor of the second.