using System;
using System.Linq.Expressions;
using System.Web.Mvc;
namespace CD67.ModeleMVC.MVC
{
public static class MvcHtmlHelpers
{
///
/// Pour utiliser ce Helper :
/// Ajouter un using en haut de la page cshtml : @using CD67.Jarvis.MVC.Internal
/// Appeler comme les autres méthodes le nouveau helper : @Html.DescriptionFor(model => model.CHAMPBDD)
///
///
///
///
///
///
public static MvcHtmlString DescriptionFor(this HtmlHelper self, Expression> expression)
{
var metadata = ModelMetadata.FromLambdaExpression(expression, self.ViewData);
var description = metadata.Description;
return MvcHtmlString.Create(string.Format(@"{0}", description));
}
}
}