Define Default constructor Structuremap in a Generic Repository

Posted by Ricky on Stack Overflow See other posts from Stack Overflow or by Ricky
Published on 2010-05-03T15:05:00Z Indexed on 2010/05/03 15:08 UTC
Read the original article Hit count: 307

Hello guys, I have a generic IRepository that has 2 constructors, one have none parameters, other has the datacontext as parameter. I want to define to structuremap to aways in this case use the parameterless constructor. I want a way to create a parameterless contructor, other solutions that I have seen, they create a new Datacontext and pass it to the constructor that has parameters.

© Stack Overflow or respective owner

Related posts about structuremap

Related posts about ioc-container