public StatusModel(EmailRequest email, EmailAction action, EmailFanoutStatus status) { Status = status.ToString(); ActionId = action.Id; ReceivedAt = email.Timestamp; PartitionKey = GetPartitionKey(email); RowKey = GetRowKey(email, action); }
public async Task <StatusModel> UpdateAsync(EmailRequest request, EmailAction action, EmailFanoutStatus status, CancellationToken cancellationToken) { await _table.CreateIfNotExistsAsync(null, null, cancellationToken); var model = new StatusModel(request, action, status); await _table.ExecuteAsync(TableOperation.InsertOrReplace(model), null, null, cancellationToken); return(model); }