示例#1
0
 /// <summary>
 /// Clears the ambient scope from the CallContext but keeps tracking its instance. Call this to temporarily
 /// hide the ambient context (e.g. to prevent it from being captured by parallel task).
 /// </summary>
 internal static void HideAmbientScope()
 {
     CallContext.LogicalSetData(AmbientDbContextScopeKey, null);
 }