Search code examples
asp.net-mvcmef

MEF: Import all repositories in the BaseController... Good idea?


is it a good idea to [import()] all repositories in the base-controller using mef, so every child controller will have all reps avaliable?

Are there disadvantages?


Solution

  • I would say it's a bad idea

    You should only bring in the dependencies that you actually require