通常最好避免在循环情况下调用渲染部分......
<% foreach (var buildingRate in locationBuildingRate.BuildingRates)
{
Html.RenderPartial("LocationBuildingRate", buildingRate);
}
%>
而是允许渲染在部分内部循环?第二种方法是否避免了很多开销?
Html.RenderPartial("LocationBuildingRate", locationBuildingRate.BuildingRates);