Using IoC class in Factories

Topics: Bootstrappers & IoC
Oct 28, 2011 at 1:16 PM

Hi,

Is it good approach to use IoC class in factory method? My entities implementing IDataErrorInfo. For validation functions I am using validators from FluentValidation. Factory for creating validator objects is like http://fluentvalidation.codeplex.com/wikipage?title=ValidatorFactory&referringTitle=Documentation. Sometimes validatators could be quiet complex and they are dependant on other stuff so I realize that using factories could be the good idea. But I would like to keep everything as independent as possible so create dependency to IoC class doesn't look much well.

Thanks for tips