예제 #1
0
 protected virtual void MarkEntityForUpdate <TEntity>(TEntity entity)
     where TEntity : class
 {
     if (entity is BasePersistableEntity basePersistableEntity)
     {
         basePersistableEntity.EditDate = DateTime.Now;
     }
     markingTasks.Add(dataWriterAdapter.UpdateAsync(entity));
 }
예제 #2
0
 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();
     }
 }