Are generic type constraints possible in blazor?
问题 How can I restrict TModel to be classes only or to be implementing a specifix interface? @typeparam TModel cannot get the syntax working. 回答1: The solution is to additionally put the type constraint in a partial code behind class. It works! 来源: https://stackoverflow.com/questions/60714729/are-generic-type-constraints-possible-in-blazor