18 lines
569 B
C#
18 lines
569 B
C#
using Application.Services.Database.PostgreSQL;
|
|
using Core.Entities;
|
|
using Infrastructure.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Infrastructure.Services.PostgreSQL;
|
|
|
|
public class MedicalHistoryRepository : BasePostgreSQLRepository<MedicalHistory>, IMedicalHistoryRepository
|
|
{
|
|
public MedicalHistoryRepository(HealthcareManagerDatabase context) : base(context)
|
|
{
|
|
}
|
|
|
|
public async Task<MedicalHistory?> GetByUserIdAsync(Guid userId)
|
|
{
|
|
return await _context.MedicalHistories.FirstOrDefaultAsync(d => d.UserId == userId);
|
|
}
|
|
} |