I am implementing Ioc and there are few things i want to make sure are right.
1.If I use RegisterInstance, on resolving it will always return the singleton object?
2.BootStrapper will be loaded in Global.asax or some place where it will be loaded initially, which means all the instances will be singleton?
But i want to know how to
1. Create a separate instance per resolve, PerResolve wont work with RegisterInstance, it works only with RegisterType.
2. If I make dependent object as static property, it will work the same way, if i am able to create separate instance per resolve?
public class ClientUser : UserServiceBase, IClientUser
private IDataServiceManager _dataServiceManager;
private IDataServiceManager DataServiceMgr
if (_dataServiceManager == null)
_dataServiceManager = ProjectContainer.Instance.Resolve<IDataServiceManager>();