using Application.Services.Database.PostgreSQL; using Domain.Entities; using Microsoft.EntityFrameworkCore; namespace Infrastructure.Services.PostgreSQL; public class PatientRepository(HealthcareManagerDatabase context) : BasePostgreSqlRepository(context), IPatientRepository { public async Task FindByEmailAsync(string email, CancellationToken token) { return await Context.Patients.FirstOrDefaultAsync(d => d.Email == email, token); } public async Task CredentialsMatch(string email, string password, CancellationToken token) { return await Context.Patients.AnyAsync(u => u.Email == email && u.Password == password, token); } }