Ejemplo n.º 1
0
        public BaseResponse UserDelete(KullaniciRequest kullaniciRequest)
        {
            var k = _kullaniciRepository.Find(x => x.KullaniciAdi == kullaniciRequest.kullaniciAdi);

            k.isOKey = false;
            _kullaniciRepository.Update(k);
            BaseResponse baseResponse = new BaseResponse();

            baseResponse.isOkey  = true;
            baseResponse.message = "başarılı silme";
            return(baseResponse);
        }
Ejemplo n.º 2
0
        public BaseResponse UserInit(KullaniciRequest kullaniciRequest)
        {
            string       kAdi         = kullaniciRequest.kullaniciAdi;
            Kullanicilar kullanicilar = new Kullanicilar();

            if (kullaniciRequest.kullaniciAdi == "admin")
            {
                int countUser = _kullaniciRepository.List().Count + 1;
                kullanicilar.KullaniciAdi = "User" + countUser;
                kullanicilar.isOKey       = true;
                _kullaniciRepository.Insert(kullanicilar);
                kAdi = kullanicilar.KullaniciAdi;
            }
            BaseResponse baseResponse = new BaseResponse();

            baseResponse.isOkey  = true;
            baseResponse.message = kAdi;
            return(baseResponse);
        }
Ejemplo n.º 3
0
 public Kullanicilar UserFind(KullaniciRequest kullaniciRequest)
 {
     return(_kullaniciRepository.Find(x => x.KullaniciAdi == kullaniciRequest.kullaniciAdi));
 }