added multithreaded api calling on homepage
This commit is contained in:
@@ -12,5 +12,13 @@ internal sealed class ProjectRepository(DatabaseContext context) : IProjectRepos
|
||||
.OrderByDescending(p => p.OrderIndex)
|
||||
.ToArrayAsync(ct);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Project>> GetFeaturedProjects(CancellationToken ct) {
|
||||
return await context.Projects
|
||||
.Include(p => p.Languages)
|
||||
.Where(p => p.Featured)
|
||||
.OrderByDescending(p => p.OrderIndex)
|
||||
.ToArrayAsync(ct);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user