1

I am migrating existing MVC application to the ASP.NET Core MVC application using SDK netcoreapp2.2.

I am using some custom razor helper in that, but dotnetcore2.2 doesn't support @helper keyword.

showing error like

error RZ1002: The helper directive is not supported.

ASP.NET MVC Example:

@helper RenderFeedMappingTable(bool hasMatchesFound,  List<IntelligentFeedMapping> lstIntelligentFeedMappingAll, List<IntelligentFeedMapping> lstIntelligentFeedMapping = null, bool isRoot = true, bool isParentMappingDone = false)
{
    string id = "";
    if (isRoot)
    {
        id = hasMatchesFound ? "tblMatchesFound" : "tblMatchesNotFound";
    }   
    <table><tr><td><input type="text" id="@id"/></td></tr></table>
}
DavidG
  • 104,599
  • 10
  • 205
  • 202
jishan siddique
  • 1,863
  • 2
  • 10
  • 19

0 Answers0