You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of the work on DeliveryChannelsAsNoTracking was added to GetAsset, this is incorrect as by adding AsNoTracking you're fighting against what EF gives you. IIRC we always will update the asset so we definitely do want to track it.
However, #622 changes this behaviour so that the Asset is always loaded from the dbContext regardless of the entrypoint to the engine. Using .AsNoTracking() mimicks the current behaviour (sometimes tracked, sometimes not) but this also means we need to keep the unnecessary complexity of working out whether it's tracked or not.
As part of the work on
DeliveryChannels
AsNoTracking
was added toGetAsset
, this is incorrect as by addingAsNoTracking
you're fighting against what EF gives you. IIRC we always will update the asset so we definitely do want to track it.A better solution would be to remove
AsNoTracking
and also remove code that doesn't update the asset if it's already being tracked, i.e.: https://github.com/dlcs/protagonist/blob/develop/src/protagonist/Engine/Data/EngineAssetRepository.cs#L167-L176The text was updated successfully, but these errors were encountered: