public object ResolveForRequest(Type t) { string key = IoCContainerPerRequestKey; UnityIoC child = (UnityIoC)UnityPerRequestHttpModule.GetValueFromContext(key); if (child != null) { object o = child.Resolve(t); return(o); } return(null); }
public T ResolveForRequest <T>() { try { string key = IoCContainerPerRequestKey; UnityIoC child = (UnityIoC)UnityPerRequestHttpModule.GetValueFromContext(key); if (child != null) { T o = child.container.Resolve <T>(); return(o); } } catch (Exception ex) { return(default(T)); } return(default(T)); }