I want to create a custom HTML helper (Image) that is used in views of a mvc5 app. It is going to be called with a lambda expression, just like the out-of-the-box helper EditorFor
@Html.EditorFor(model => model.Name)
@Html.Image(model => model.ImagePath)
Below is the empty helper I have. I need to get the value of the model.ImagePath variable (to create the img-tag). How is that done ? (I already know how to create the rest of the helper)
public static IHtmlString Image<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> imagePath) {
}