private void EmailKontrolu(Uye uye) { if (_uyeDal.Get(m => m.Email == uye.Email) != null) { throw new Exception("Bu kullanıcı daha önce kayıt olmuştur"); } }
public ActionResult Index(Uye uye, Admin admin) { var kullanici = _uyeDal.Get(x => x.Email == uye.Email && x.Sifre == uye.Sifre); var adminkullanici = _adminDal.Get(x => x.Email == admin.Email && x.Sifre == admin.Sifre); if (kullanici != null) { FormsAuthentication.SetAuthCookie(kullanici.Email, false); return(RedirectToAction("Index", "Profilim")); } if (adminkullanici != null) { //FormsAuthentication.SetAuthCookie(kullanici.Email, false); return(RedirectToAction("Index", "Admin")); } else { return(View()); } }
public Uye Get(int id) { return(_uyeDal.Get(x => x.Id == id)); }
public Uye GetById(int uyeId) { return(uyeDal.Get(p => p.uyeNo == uyeId)); }