How to inject Service interface

Jul 31, 2015 at 3:53 PM
Edited Jul 31, 2015 at 3:54 PM
Hello,
can you me help unity injection ICacheManager in ctor?

Ctor:
public PermissionService(IRepositoryAsync<Permission> permissionRepository, ICacheManager cacheManager)
    : base(permissionRepository)
{
    _permissionRepository = permissionRepository;
    _cacheManager = cacheManager;
}
Unity:
container.RegisterType<ICacheManager, CacheManager>("cache")
    .RegisterType<ICacheManager, CacheManager1>("cache1")

    //injection not working (factory)
    .RegisterType<IPermissionService, PermissionService>(
        new InjectionFactory(c =>
            new PermissionService(
                c.Resolve<IRepositoryAsync<Permission>>()
                c.Resolve<ICacheManager>("cache"))))

    //injection not working (constructor)
    .RegisterType<IPermissionService>(
        new InjectionConstructor(new ResolvedParameter<IRepositoryAsync<Permission>>(),
              new ResolvedParameter<ICacheManager>("cache")))
What im doing wrong?
Thank you for your help.