finalizare 1.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user