finalizare 1.0

This commit is contained in:
andrei-mihnea-cerbu
2024-05-21 12:10:53 +03:00
parent f7795f7519
commit 1cc1d34003
11268 changed files with 2102399 additions and 10909 deletions
@@ -1,18 +1,14 @@
using Application.Services.Database.PostgreSQL;
using Core.Entities;
using Infrastructure.Data;
using Domain.Entities;
using Microsoft.EntityFrameworkCore;
namespace Infrastructure.Services.PostgreSQL;
public class MedicalHistoryRepository : BasePostgreSQLRepository<MedicalHistory>, IMedicalHistoryRepository
public class MedicalHistoryRepository(HealthcareManagerDatabase context)
: BasePostgreSqlRepository<MedicalHistory>(context), IMedicalHistoryRepository
{
public MedicalHistoryRepository(HealthcareManagerDatabase context) : base(context)
public async Task<MedicalHistory?> GetByPatientIdAsync(Guid patientId, CancellationToken token)
{
}
public async Task<MedicalHistory?> GetByUserIdAsync(Guid userId)
{
return await _context.MedicalHistories.FirstOrDefaultAsync(d => d.UserId == userId);
return await Context.MedicalHistories.FirstOrDefaultAsync(d => d.UserId == patientId, token);
}
}