Skip to content

Commit 13a7647

Browse files
committed
Made improvements
1 parent 2b98044 commit 13a7647

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Postgrest/Interfaces/IPostgrestTable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ IPostgrestTable<TModel> Filter<TCriterion>(Expression<Func<TModel, object>> pred
125125
/// <param name="type">The kind of count.</param>
126126
/// <param name="cancellationToken"></param>
127127
/// <returns></returns>
128-
Task<Tuple<List<TModel>, int>> GetWithCount(Constants.CountType type,
128+
Task<(ModeledResponse<TModel> Result, int Count)> GetWithCount(Constants.CountType type,
129129
CancellationToken cancellationToken = default);
130130

131131
/// <summary>

Postgrest/Table.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ public Task<ModeledResponse<TModel>> Get(CancellationToken cancellationToken = d
636636
}
637637

638638
/// <inheritdoc />
639-
public async Task<Tuple<List<TModel>, int>> GetWithCount(CountType type, CancellationToken cancellationToken = default)
639+
public async Task<(ModeledResponse<TModel> Result, int Count)>GetWithCount(CountType type, CancellationToken cancellationToken = default)
640640
{
641641
var attr = type.GetAttribute<MapToAttribute>();
642642

@@ -652,7 +652,7 @@ public async Task<Tuple<List<TModel>, int>> GetWithCount(CountType type, Cancell
652652
var countStr = response.ResponseMessage?.Content.Headers.GetValues("Content-Range").FirstOrDefault();
653653
var count = int.Parse(countStr?.Split('/')[1] ?? throw new InvalidOperationException());
654654

655-
return new Tuple<List<TModel>, int>(response.Models, count);
655+
return (response, count);
656656
}
657657

658658
/// <summary>

0 commit comments

Comments
 (0)