[CHANGE]
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
@page "/Accounts"
|
@page "/Accounts"
|
||||||
|
|
||||||
|
<PageTitle>Accounts</PageTitle>
|
||||||
|
|
||||||
@code {
|
|
||||||
|
|
||||||
}
|
|
@@ -4,4 +4,5 @@ namespace Manager.App.Components.Pages;
|
|||||||
|
|
||||||
public partial class Accounts : ComponentBase
|
public partial class Accounts : ComponentBase
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
@@ -50,12 +50,12 @@ public class LibraryService : ILibraryService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Result<List<ClientAccountEntity>>> GetAccountsAsync(int total = 20, int offset = 0, CancellationToken cancellationToken = default)
|
public async Task<Result<List<ChannelEntity>>> GetAccountsAsync(int total = 20, int offset = 0, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await using var context = await _dbContextFactory.CreateDbContextAsync(cancellationToken);
|
await using var context = await _dbContextFactory.CreateDbContextAsync(cancellationToken);
|
||||||
var orderedAccounts = context.Accounts.OrderBy(x => x.Id).Skip(offset).Take(total);
|
var orderedAccounts = context.Channels.Include(x => x.ClientAccount).Where(x => x.ClientAccount != null).OrderBy(x => x.Id).Skip(offset).Take(total);
|
||||||
return orderedAccounts.ToList();
|
return orderedAccounts.ToList();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
Reference in New Issue
Block a user