Is it possible to pass ModelExpression to a TagHelper?

…衆ロ難τιáo~ 提交于 2019-12-05 08:19:00

ModelExpression is handled as a special case in the Razor Compiler, so this isn't going to work directly. Since the compiler is open source, you could suggest a patch to ignore cases where the property is itself a ModelExpression. In the mean time, you're going to need to use a different type of property in your tag helper, to help you get a reference to the actual ModelExpression. Perhaps public Func<ModelExpression> ForAccessor { get; set; }?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!