Exemple #1
0
        public async Task DeleteAsync(Guid userId, IEnumerable <Guid> ids, CancellationToken ct)
        {
            var changes = new List <OrderAttributeChange>();

            await _storage.OrderAttributes
            .Where(x => ids.Contains(x.Id))
            .ForEachAsync(x => changes.Add(x.UpdateWithLog(userId, a =>
            {
                a.IsDeleted      = true;
                a.ModifyDateTime = DateTime.UtcNow;
            })), ct);

            await _storage.AddRangeAsync(changes, ct);

            await _storage.SaveChangesAsync(ct);
        }