35 references to UsingNoTracking
System.Data.Entity (35)
System\Data\Objects\DataClasses\EntityCollection.cs (2)
649
if (
UsingNoTracking
)
664
if (
UsingNoTracking
)
System\Data\Objects\DataClasses\EntityReference.cs (4)
90
if (this.ObjectContext != null && !
UsingNoTracking
)
173
if (this.ObjectContext != null && !
UsingNoTracking
)
305
!
UsingNoTracking
&&
329
Debug.Assert(this.ObjectContext != null && !
UsingNoTracking
, "Should only need to access AttachedEntityKey property on attached EntityReferences");
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (2)
133
if (
UsingNoTracking
)
475
if (WrappedOwner.Entity != null && WrappedOwner.Context != null && !
UsingNoTracking
)
System\Data\Objects\DataClasses\RelatedEnd.cs (26)
280
return
UsingNoTracking
? MergeOption.NoTracking : MergeOption.AppendOnly;
340
if (
UsingNoTracking
)
363
Debug.Assert(!(entityState != EntityState.Detached &&
UsingNoTracking
), "Entity with NoTracking option cannot exist in the ObjectStateManager");
370
if (!((entityState == EntityState.Detached &&
UsingNoTracking
) ||
684
if (
UsingNoTracking
!= (mergeOption == MergeOption.NoTracking))
689
if (
UsingNoTracking
)
738
if (
UsingNoTracking
||
903
if (null == this.ObjectContext ||
UsingNoTracking
)
938
Debug.Assert(!
UsingNoTracking
, "We should not be here for NoTracking case.");
1085
if (_context != null && !
UsingNoTracking
)
1151
if (
UsingNoTracking
!= targetRelatedEnd.
UsingNoTracking
)
1153
throw EntityUtil.CannotCreateRelationshipBetweenTrackedAndNoTrackedEntities(
UsingNoTracking
?
1160
if (
UsingNoTracking
&& targetRelatedEnd.
UsingNoTracking
)
1173
else if ((_context == null ||
UsingNoTracking
) && (targetRelatedEnd.ObjectContext != null && !targetRelatedEnd.
UsingNoTracking
))
1232
if (!this.IsForeignKey && !relationshipAlreadyExists && !
UsingNoTracking
)
1270
if (!attachedRelatedEnd.
UsingNoTracking
)
1361
Debug.Assert(!
UsingNoTracking
, "Should not be attempting to add graphs to the state manager with NoTracking related ends");
1436
if (!
UsingNoTracking
&&
1570
Debug.Assert(!
UsingNoTracking
, "Should not be trying to include entities in the state manager for NoTracking related ends");
1749
Debug.Assert(!
UsingNoTracking
, "Should not try to exclude entities from the state manager for NoTracking related ends.");
1782
Debug.Assert(!
UsingNoTracking
, "Should not look for RelationshipEntry in ObjectStateManager for NoTracking cases.");
2107
Debug.Assert(!
UsingNoTracking
, "Should not add an Entity to ObjectStateManager for NoTracking cases.");
2149
Debug.Assert(!
UsingNoTracking
, "Should not add Relationship to ObjectStateManager for NoTracking cases.");
System\Data\Objects\DataClasses\RelationshipManager.cs (1)
1123
Debug.Assert(!relatedEnd.
UsingNoTracking
, "Shouldn't be touching the state manager with entities that were retrieved with NoTracking");