/// <summary>
        /// Remove patient by entering patient ID
        /// </summary>
        /// <param name="ID">int</param>
        /// <returns></returns>
        public async Task RemovePatientResources(int ID)
        {
            PatientResources patientResources = await _context.PatientResources.FindAsync(ID);

            _context.PatientResources.Remove(patientResources);
            await _context.SaveChangesAsync();
        }
        /// <summary>
        /// Converting patient resource object to DTO
        /// </summary>
        /// <param name="patientResources"></param>
        /// <returns>Patient resource DTO</returns>
        public PatientResourcesDTO ConvertToDTO(PatientResources patientResources)
        {
            PatientResourcesDTO pDTO = new PatientResourcesDTO()
            {
                ResourcesID = patientResources.ResourcesID,
                PatientID   = patientResources.PatientID
            };

            return(pDTO);
        }
 /// <summary>
 /// Creates a new patient resource
 /// </summary>
 /// <param name="patientResources">patient resource object</param>
 /// <returns></returns>
 public async Task AssignPatientResources(PatientResources patientResources)
 {
     _context.PatientResources.Add(patientResources);
     await _context.SaveChangesAsync();
 }
        public async Task <ActionResult <PatientResources> > AssignPatientResources(PatientResources patientResources)
        {
            await _context.AssignPatientResources(patientResources);

            return(CreatedAtAction("AssignPatientResources", new { patientResources }));
        }