Files
FACULTATE-HEALTHCARE_MANAGER/backend/Infrastructure/Services/PostgreSQL/MedicalHistoryRepository.cs
T
2024-05-21 12:10:53 +03:00

14 lines
532 B
C#

using Application.Services.Database.PostgreSQL;
using Domain.Entities;
using Microsoft.EntityFrameworkCore;
namespace Infrastructure.Services.PostgreSQL;
public class MedicalHistoryRepository(HealthcareManagerDatabase context)
: BasePostgreSqlRepository<MedicalHistory>(context), IMedicalHistoryRepository
{
public async Task<MedicalHistory?> GetByPatientIdAsync(Guid patientId, CancellationToken token)
{
return await Context.MedicalHistories.FirstOrDefaultAsync(d => d.UserId == patientId, token);
}
}