Autofac in web applications, where should I store the container for easy access?

前端 未结 5 1070
难免孤独
难免孤独 2020-12-08 23:16

I\'m still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places

5条回答
  •  忘掉有多难
    2020-12-08 23:48

    The usual way of doing this is to store the container in a static variable in your Global app class.

提交回复
热议问题