How to use Dependency Injection with ASP.NET Web Forms

前端 未结 6 1671
一生所求
一生所求 2020-11-27 14:02

I am trying to work out a way to use dependency injection with ASP.NET Web Forms controls.

I have got lots of controls that create repositories directly, and use tho

6条回答
  •  盖世英雄少女心
    2020-11-27 15:02

    You could also create some singleton instances in the Application_Start global.asax event and have them available as public static readonly properties.

提交回复
热议问题