0

as titled

i'd like use syntax like this:

allControllers.Find(x=>x.Name=="HomeController")

i want to add a attribute to an action using LINQ when application start

Scott 混合理论
  • 2,263
  • 8
  • 34
  • 59

1 Answers1

1

I think you can use reflection to get all controllers. This link could help. And then use reflection to get instances of that types (see Activator).

Community
  • 1
  • 1
Frigik
  • 449
  • 1
  • 3
  • 13