Unity SprocAccessor Injection

Topics: Data Access Application Block, Enterprise Library Core
Oct 17, 2011 at 7:42 AM

The documentation shows how to register Unity to resolve an SprocAccessor object:


container.RegisterType<DataAccessor<CustomerType>, SprocAccessor<CustomerType>>("Sproc",
                new InjectionConstructor(
                    new ResolvedParameter<Database>(),
                    new InjectionParameter<string>("CustomerDB"),
                    new InjectionParameter(MapBuilder<CustomerType>.BuildAllProperties())

Can somebody show how to achieve the same thing but with the config file? Thanks.




Oct 18, 2011 at 5:28 AM

You can also try asking this to Unity Forum to get a wider audience.