1
我想编写一个表达式来检索属性中的属性。我的2类:表达式树中的嵌套属性
public class BusinessType
{
public string Proprietor
{
get { return "Proprietor"; }
}
}
public class VendorApplicationViewModel
{
public List<BusinessType> BusinessClassification { get; set; }
}
public static IHtmlString RadioListForIEnum<TModel, TProperty>(this HtmlHelper<TModel> htmlhelper,
Expression<Func<TModel, TProperty>> expression)
{
var prop = ModelMetadata.FromLambdaExpression(expression, htmlhelper.ViewData);
//Func<TModel2, TProperty2> nestedProperty =
return null;
}
我宁愿失去了,我怎么能做到这一点。此外,我对表达式树很新,对教程有很好的建议,不胜感激。谢谢
它极难破译你问这里。 – nawfal