Re-recording 03_03

This commit is contained in:
Jess Chadwick
2018-06-11 22:49:05 -04:00
parent 278c453162
commit 6aa5206783
4 changed files with 40 additions and 11 deletions

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using HPlusSports.Models;
namespace HPlusSports
{
public static class ProductHelpers
{
public static IHtmlString Rating(this System.Web.Mvc.HtmlHelper html, ProductRating rating)
{
if (rating == null || rating.ReviewCount == 0)
{
return new MvcHtmlString("<span><em>No Rating</em></span>");
}
return html.Partial("_Rating", rating);
}
}
}