• Changed some methods on the Container Provider to allow some better testability around using the Unit of Work container
    Old syntax:
    using (var unitOfWork = ContainerProvider.Instance.CreateUnitOfWorkContainer())
    {
        var dependency = unitOfWork.Resolve<IAmADependency>();
        dependency.Foo();
    }
    
    New syntax:
    using (var unitOfWork = ContainerProvider.Instance.CreateUnitOfWork())
    {
        var dependency = unitOfWork.Resolve<IAmADependency>();
        dependency.Foo();
    }
    
  • CreateUnitOfWork no longer returns an ILifetimeScope, but instead returns an IUnitOfWorkContainer which has Resolve<T> and InjectUnsetProperties methods on it (for now)

Last edited Oct 5, 2011 at 8:31 PM by amiller, version 2

Comments

No comments yet.