#925 Доработать ITimestampedValuesClient и IChangeLogClient под асибр #20
No reviewers
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: on.nemtina/persistence#20
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "TimestampedValuesGet"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -37,10 +37,15 @@ public class TimestampedValuesRepository : ITimestampedValuesRepository
return result;
}
public async virtual Task<IEnumerable<Tuple<DateTimeOffset, object[]>>> Get(Guid discriminatorId, DateTimeOffset? timestampBegin, IEnumerable<string>? columnNames, int skip, int take, CancellationToken token)
В методе AddRange лучше усовершенствовать код:
var timestampedValuesEntities = dtos.Select(dto => new TimestampedValues()
{
DiscriminatorId = discriminatorId,
Timestamp = dto.Timestamp.ToUniversalTime(),
Values = dto.Values.Values.ToArray()
});
@ -93,0 +97,4 @@
var resultToMaterialize = new[] { KeyValuePair.Create(discriminatorId, result) }
.ToDictionary();
var dtos = await Materialize(resultToMaterialize, token);
Метод Count можно убрать, так как внутри него нет особой бизнес-логики. К репозиторию можно обращаться напрямую.