14 lines
532 B
C#
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);
|
|
}
|
|
} |