@if (Model == null) { return; }
@if (Model != null) { @Html.Partial("somePartial",Model) }
或者如果您使用RenderPartial:
@if (Model != null) { @{Html.RenderPartial("somePartial",Model);} }