public List <RandevuDTO> GetByDoktorId(int id)
        {
            using (RandevuRepository randevuRepo = new RandevuRepository())
            {
                try
                {
                    var model = randevuRepo.GetByFilter(x => x.doktorID == id && x.durum == true && x.kullaniciID != 1, x => x.Doktor, x => x.Kullanici, x => x.Kullanici.KullaniciBilgileri, x => x.Doktor.Bolum, x => x.Doktor.Hastane).ToList();

                    return(randevuMapper.MapAll(model));
                }
                catch
                {
                    throw;
                }
            }
        }
 public bool CheckSameDate(int kullaniciId, DateTime tarih, TimeSpan saat)
 {
     using (RandevuRepository randevuRepo = new RandevuRepository())
     {
         try
         {
             var model = randevuRepo.GetByFilter(x => x.kullaniciID == kullaniciId && x.tarih == tarih && x.saat == saat, x => x.Doktor, x => x.Kullanici, x => x.Doktor.Bolum, x => x.Doktor.Hastane).ToList();
             if (model.Count == 0)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         catch
         {
             throw;
         }
     }
 }
 public List <RandevuDonusDTO> GetForUser(DateTime tarih, int doktorId, int kullaniciId)
 {
     using (RandevuRepository randevuRepo = new RandevuRepository())
     {
         try
         {
             var model = randevuRepo.GetByFilter(x => x.doktorID == doktorId && x.tarih == tarih && x.durum == true, x => x.Kullanici.KullaniciBilgileri, x => x.Doktor.Bolum, x => x.Doktor.Hastane).ToList();
             if (model.Count < 16)
             {
                 return(randevuMapper.MapDonus(model));
             }
             else
             {
                 return(null);
             }
         }
         catch
         {
             throw;
         }
     }
 }