Is there a way I can share dependencies between a validator and a service? In particular an IDbConnection.
Currently I’m injecting a IDbConnectionFactory into my validator then lazy loading an IDbConnection, like Service
does. However the validator doesn’t get disposed until the service does, so that connection hangs around.
Is there a way I can share the connection? (Maybe by resolving it differently in the validator?) Or can the validator be disposed sooner?