Added api endpoints and configured hopframe
This commit is contained in:
15
src/Portfolio.Api/Services/ProjectRepository.cs
Normal file
15
src/Portfolio.Api/Services/ProjectRepository.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Portfolio.Shared.Models;
|
||||
using Portfolio.Shared.Services;
|
||||
|
||||
namespace Portfolio.Api.Services;
|
||||
|
||||
internal sealed class ProjectRepository(DatabaseContext context) : IProjectRepository {
|
||||
|
||||
public async Task<IEnumerable<Project>> GetProjects(CancellationToken ct) {
|
||||
return await context.Projects
|
||||
.Include(p => p.Languages)
|
||||
.ToArrayAsync(ct);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user