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); }
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); }
public Kullanicilar UserFind(KullaniciRequest kullaniciRequest) { return(_kullaniciRepository.Find(x => x.KullaniciAdi == kullaniciRequest.kullaniciAdi)); }