21 lines
538 B
C#
21 lines
538 B
C#
using Application.Services.Database;
|
|
using Core.Entities;
|
|
using Infrastructure.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Infrastructure.Services.PostgreSQL
|
|
{
|
|
public class DoctorRepository : BasePostgreSQLRepository<Doctor>, IDoctorRepository
|
|
{
|
|
public DoctorRepository(HealthcareManagerDatabase context) : base(context)
|
|
{
|
|
}
|
|
|
|
public async Task<bool> IsDoctorExisting(string email)
|
|
{
|
|
return await _context.Doctors.AnyAsync(d => d.Email == email);
|
|
}
|
|
|
|
}
|
|
}
|