If you do not define it inside SomeClass<TController> (in this case you need to put a restriction next to the class SomeClass<TController> ), you need to make TController general argument to your function, that is:
public void Test<TFeature, TController>(Func<TController, ViewResult> controllerAction) where TController : IController where TFeature : ISecurityFeature { ... }
Krizz source share