autofac
How to use Autofac in a class library project?
I have the following implementation: private INewsRepository newsRepository; public NewsService(INewsRepository newsRepository)[详细]
2023-02-08 02:00 分类:问答Does Ninject support Func (auto generated factory)?
Autofac automatically generates factories for Func<T>; I can even pass parameters. public class MyClass[详细]
2023-02-07 05:46 分类:问答Autofac vs Ninject contextual binding?
1) Autofac and Ninject, which one is better in cont开发者_开发知识库extual binding? 2) With Ninject, I can bind to types in a specific namespace:[详细]
2023-02-07 05:42 分类:问答Can't get Autofac to resolve ObservableCollection<string>
I don\'t have much programming experience, so sorry if this is an obvious question. See the following code. Autofac can resolve ObservableCollection<int>, but not ObservableCollection<string[详细]
2023-02-07 03:50 分类:问答Injecting an internal helper class while resolving a public class
I have the following architecture where a public Service class referencing an internal Helper class exists in another assembly:[详细]
2023-02-06 12:36 分类:问答Is it possible to get container type in AutoFac
For example, I have registered class C1 with one parameter in constructor of t开发者_开发知识库ype System.Type. I have another class (C2) with injected parameter of type C1. And I want receive typeof([详细]
2023-02-06 12:06 分类:问答Is it possible to use an IOC container to instantiate a custom MembershipProvider?
I\'m using Autofac with ASP.NET MVC so all my controllers have their dependencies resolved nicely. But I have a custom membership provider with two dependencies. I suspect that the code to instantiate[详细]
2023-02-06 02:01 分类:问答MVC Controller Generic injection with AutoFac
I am fairly new to DI with Autofac and wonder if the following is possible I want to create a generic controller and action that receives an[详细]
2023-02-05 01:56 分类:问答using Autofac in a multi-layered architecture
I\'m fairly new to the DI/IoC concept and would like to use Autofac in a 3-layered ASP.NET Webforms application.[详细]
2023-02-03 18:53 分类:问答Using IoC to modify an object when it's instantiated
I need some duct tape... I have a scenario where two objects, backed by two separate databases (on separate servers), have need to relate to one another.I have the object graph in place, but due to so[详细]
2023-02-03 02:22 分类:问答