Unity SprocAccessor Injection

Topics: Data Access Application Block, Enterprise Library Core
Oct 17, 2011 at 8: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.

TD

 

 

Oct 18, 2011 at 6:28 AM

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