Filter constructor injection using Ninject

后端 未结 3 2142
我寻月下人不归
我寻月下人不归 2021-02-08 04:30

I am trying to find a way to use Ninject to inject constructor dependencies into filters. I am finding many articles describing property injection which is now advised against,

3条回答
  •  心在旅途
    2021-02-08 04:54

    Assuming that the attribute is to be a part of the metadata, which means that it should be instantiated at the compile time, it is not possible to have a repository injected into an attribute by any ioc container. Containers operate in run time.

提交回复
热议问题