Class EfPatientRepository
- Namespace
- API.CliniCore.Data.Repositories
- Assembly
- API.CliniCore.dll
Entity Framework Core implementation of IPatientRepository. Provides SQLite-backed persistence for patient profiles.
public class EfPatientRepository : IPatientRepository, IRepository<PatientProfile>
- Inheritance
-
EfPatientRepository
- Implements
- Inherited Members
Constructors
EfPatientRepository(CliniCoreDbContext)
public EfPatientRepository(CliniCoreDbContext context)
Parameters
contextCliniCoreDbContext
Methods
Add(PatientProfile)
public void Add(PatientProfile patient)
Parameters
patientPatientProfile
Delete(Guid)
public void Delete(Guid id)
Parameters
idGuid
GetAll()
public IEnumerable<PatientProfile> GetAll()
Returns
GetById(Guid)
public PatientProfile? GetById(Guid id)
Parameters
idGuid
Returns
GetByPhysician(Guid)
Gets all patients assigned to a specific physician
public IEnumerable<PatientProfile> GetByPhysician(Guid physicianId)
Parameters
physicianIdGuid
Returns
GetByUsername(string)
Gets a patient by their username
public PatientProfile? GetByUsername(string username)
Parameters
usernamestring
Returns
GetUnassigned()
Gets all patients not assigned to any physician
public IEnumerable<PatientProfile> GetUnassigned()
Returns
Search(string)
public IEnumerable<PatientProfile> Search(string query)
Parameters
querystring
Returns
Update(PatientProfile)
public void Update(PatientProfile patient)
Parameters
patientPatientProfile