public static void SetObject(string identifier, object value) { if(RepositoryConfiguration.IsWebEnvironment) { HttpContext.Current.Items[identifier] = value; } else { CallContext.SetData(identifier, value); } }