protected virtual void MarkEntityForUpdate <TEntity>(TEntity entity) where TEntity : class { if (entity is BasePersistableEntity basePersistableEntity) { basePersistableEntity.EditDate = DateTime.Now; } markingTasks.Add(dataWriterAdapter.UpdateAsync(entity)); }
protected virtual void MarkEntityForUpdate <TEntity>(TEntity entity) where TEntity : class { if (entity is BasePersistableEntity basePersistableEntity) { basePersistableEntity.EditDate = DateTime.Now; } threadSafety.Wait(); try { markingTasks.Add(dataWriterAdapter.UpdateAsync(entity)); } finally { threadSafety.Release(); } }