public SorularViewModel(ISorularRepository sorularRepository, IOdaRepository odaRepository
                                , IKoridorRepository koridorRepository, INesneRepository nesneRepository)
        {
            _koridorRepository = koridorRepository;
            _odaRepository     = odaRepository;
            _nesneRepository   = nesneRepository;
            _sorularRepository = sorularRepository;

            koridors = _koridorRepository.GetKoridorAsync().GetAwaiter().GetResult();

            Koridorlarim = koridors.Select(x => x.Numara).ToArray <Int32>();

            odalars = _odaRepository.GetOdaAsync().GetAwaiter().GetResult();

            Odalarim = odalars.Select(x => x.Numara).ToArray <Int32>();

            nesnes = _nesneRepository.GetNesneAsync().GetAwaiter().GetResult();

            Nesnelerim = nesnes.Select(x => x.Adi).ToArray();
        }
        public DoktorHemsireSayfasiViewModel(INavigation navigation, ISorularRepository sorularRepository, IDoktorRepository doktorRepository,
                                             IHastaneRepository hastaneRepository, IHemsireRepository hemsireRepository,
                                             IOdaRepository odalarRepository, IKoridorRepository koridorRepository
                                             , INesneRepository nesneRepository)
        {
            _doktorRepository  = doktorRepository;
            _hastaneRepository = hastaneRepository;
            _odalarRepository  = odalarRepository;
            _nesneRepository   = nesneRepository;
            _soruRepository    = sorularRepository;
            _koridorRepository = koridorRepository;

            Navigation = navigation;

            Sorularim = _soruRepository.QuerySoruAsync(x => !SoruyaCevapVerildiMi(x.ZamanPeridoyu, x.CevaplanmaZamani)).GetAwaiter().GetResult();



            Odalars  = _odalarRepository.GetOdaAsync().GetAwaiter().GetResult();
            Koridors = _koridorRepository.GetKoridorAsync().GetAwaiter().GetResult();
            Doktors  = _doktorRepository.GetDoktorAsync().GetAwaiter().GetResult();
            Nesnes   = _nesneRepository.GetNesneAsync().GetAwaiter().GetResult();
            var hastanes = _hastaneRepository.GetHastaneAsync().GetAwaiter().GetResult();



            CevaplariGöster = new Command(x =>
            {
                Cevaplar cevapKayit = new Cevaplar();
                Navigation.PushModalAsync(cevapKayit).GetAwaiter();
                cevapKayit.BindingContext = new CevaplarModelViewModel(sorularRepository, doktorRepository);
            });


            AnaEkranCommand = new Command(x =>
            {
                AnaEkran anaekran = new AnaEkran();
                Navigation.PushModalAsync(new NavigationPage(anaekran)).GetAwaiter();

                //  anaekran.BindingContext = new AnaEkranViewModel(Navigation,_sorularRepository, _doktorRepository, _hastaneRepository);
            });



            GunlukCommand = new Command(x =>
            {
                Sorularim = _soruRepository.QuerySoruAsync(asd => asd.ZamanPeridoyu == "günlük" && !asd.CevaplandiMi).GetAwaiter().GetResult();
                //Günlük
            });

            HaftalikCommand = new Command(x =>
            {
                Sorularim = _soruRepository.QuerySoruAsync(asd => asd.ZamanPeridoyu == "haftalık" && !asd.CevaplandiMi).GetAwaiter().GetResult();
                //Haftalik
            });

            AAAA = new Command(x =>
            {
                if (_question != null)
                {
                    //_question.Cevap = Cevap;
                    _question.CevaplandiMi = true;
                    if (_question.ZamanPeridoyu == "haftalik")
                    {
                        _question.CevaplanmaZamani = DateTime.Now.StartOfWeek(DayOfWeek.Monday);
                    }
                    else
                    {
                        _question.CevaplanmaZamani = DateTime.Now;
                        //   _question.CevapDate = DateTime.Now.;
                    }
                    _soruRepository.UpdateSoruAsync(_question);
                }
            });
        }