Autofac 是一種幫忙管理物件注入的容器,能夠幫助我們在 Controller 建構式注入物件,這樣才有辦法與實體隔離,幫助我們寫單元測試。 今天就來說明怎麼設定 Autofac 使 Controller 建構式注入物件。 今天會以 Web API 為例子。(要注意:MVC的註冊方式有點不同)

Continue reading
  • page 1 of 1
Author's picture

Miles

I’m a person who is enthusiastic about Coding, and that’s my job by the way.


Web Developer


Taiwan