public List <HIVtestUpload> GetAllFiles(int PatientId)
 {
     using (var filerep = new HIVTestUploadRepository())
     {
         return(filerep.GetAllDownloadedFiles().Where(x => x.PatientId == PatientId).Select(x => new HIVtestUpload()
         {
             FileId = x.Id,
             FileName = x.FileName,
             ModelFile = x.File,
             patientName = x.patientName
         }).ToList());
     }
 }
        public List <HIVtestUpload> GetPatientNameFiles(int id)
        {
            PatientRepository pr = new PatientRepository();

            using (var Filerepo = new HIVTestUploadRepository())
            {
                int MyId = Convert.ToInt32(id);

                var name = pr.GetAll().Find(x => x.PatientId == MyId);
                return(Filerepo.GetAllDownloadedFiles().Select(x => new HIVtestUpload()
                {
                    FileId = x.Id,
                    FileName = x.FileName,
                    ModelFile = x.File,
                    patientName = name.FullName + " " + name.Surname
                }).ToList());
            }
        }