How to register multiple IDbConnectionFactory instances using Funq in ServiceStack.net

前端 未结 4 558
暗喜
暗喜 2020-12-08 03:15

How would you go about registering diferent IDbConnectionFactory instances in Funq and then access them directly within your services? Do named instances somehow come into

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 03:47

    Try using the Repository pattern instead of this IoC (which just complicates things unnecessarily). The code above seems not to work. Suspect something has changed. I'm still unclear as to how registering an IDbConnectionFactory magically populates the IDbConnection property. Would love some explanation around this. If someone ever does get this working using the ServiceStack IoC container.. then I'd love to see how. And it would be hugely benefitial to update the SS docs (I'm quite happy to do it)

提交回复
热议问题