Beispiel #1
0
        public virtual void UseExpression <T, TValue>(Expression <Func <T, TValue> > exp)
        {
            string groupName = "FG_" + RazorUtils.GetMemberName(exp).Replace(".", "_");

            InputModel = new NgInput
            {
                MemberName  = RazorUtils.GetMemberName(exp),
                NgModelName = Helper.GetModelName(),
                NgFormName  = Helper.GetFormName(),
                GroupName   = groupName
            };
        }
 public static IHtmlContent Property <T, TValue>(this IHtmlHelper <T> helper, Expression <Func <T, TValue> > expression, string modelName = null)
 {
     modelName = modelName ?? helper.GetModelName();
     return(new HtmlString(modelName + "." + RazorUtils.GetMemberName(expression)));
 }