Good day,
How do i convert this spring configuration to structuremap configuration. I have this spring.net config.
<db:provider id="DbProvider"
provider="System.Data.SqlClient"
connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
<object id="adoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data">
<property name="DbProvider" ref="DbProvider"/>
</object>
</objects>
My conversion is like this,
For<Spring.Data.Core.AdoTemplate>().Use<Spring.Data.Core.AdoTemplate>().Configure.WithProperty("DBProvider").EqualTo(??????);
How/where do i get the instance of the DBProvider property? In Spring .Net it is defined in the xml tag but i do not know how this is done on structure map.
Has anybody encountered the same problem and found a solution? Please help.
Not that I've ever used structuremap but the Spring.NET providername "System.Data.SqlClient" is mapped in Spring.NET 1.3.1 to the xml configuration posted below as available in the Spring.NET source code. You can extract the pieces of information (probably the type names are the ones you're looking for) as needed.