How to share instance between decoratee and decorator in the context of ScopedLifestyle.Flowing
问题 I don't understand how to to share instance between decoratee and decorator by using a DI container. The following example illustrates my problem. The context instance is shared between the TransactionCommandDecorator and the Command service. var context = UowFactory.GetUnitOfWork(); var command = new TransactionCommandDecorator( context, new Command(context)); command.Execute(new CommandParams { }); context.dispose(); Basically I need to have a lot of commands that interact with the database