Beispiel #1
0
        public BaseResponse KelimeEkle(WordRequest wordRequest)
        {
            var          user         = _kullaniciRepository.Find(x => x.KullaniciAdi == wordRequest.kullanici && x.isOKey == true);
            BaseResponse baseResponse = new BaseResponse();

            if (user != null)
            {
                Kelimeler kelimeler = new Kelimeler();
                kelimeler.Kelime         = wordRequest.kelime;
                kelimeler.KelimeAnlami   = wordRequest.anlami;
                kelimeler.isOKey         = false;
                kelimeler.KullanicilarId = user.Id;
                _kelimeRepository.Insert(kelimeler);
                baseResponse.isOkey  = true;
                baseResponse.message = "Kayıt Başarılı";
            }
            else
            {
                baseResponse.isOkey  = false;
                baseResponse.message = "Lütfen kullanıcı adınızı düzenledikten sonra kelime ekleyin";
            }

            return(baseResponse);
        }
 public async Task <Kullanici> Login(string eposta, string parola)
 {
     return(await _kullaniciRepository
            .Find(f => f.Eposta == eposta && f.Parola == parola)
            .FirstOrDefaultAsync());
 }
Beispiel #3
0
 public Kullanicilar UserFind(KullaniciRequest kullaniciRequest)
 {
     return(_kullaniciRepository.Find(x => x.KullaniciAdi == kullaniciRequest.kullaniciAdi));
 }