public ActionResult Soru(int id) { kullaniciModeli = new KullaniciModel(); servis = new KodusorServisClient(); kullaniciModeli.Soru = servis.SoruGetir(id); if (Session["kullaniciID"] != null) { int kulID = Convert.ToInt32(Session["kullaniciID"]); kullaniciModeli.Kullanici = servis.KullaniciBilgileriniGetir(kulID); kullaniciModeli.FavoriSorular = servis.FavoriSorular(kulID).ToList(); kullaniciModeli.FavoriCevaplar = servis.FavoriCevaplar(kulID).ToList(); } return(View(kullaniciModeli)); }
// GET: Profil public ActionResult Index() { if (Session["kullaniciID"] != null) { kullaniciModeli = new KullaniciModel(); servis = new KodusorServisClient(); int kulID = Convert.ToInt32(Session["kullaniciID"]); kullaniciModeli.Kullanici = servis.KullaniciBilgileriniGetir(kulID); kullaniciModeli.SoruListesi = servis.SorulariListele(kulID).ToList(); kullaniciModeli.CevapListesi = servis.KullaniciCevapları(kulID).ToList(); kullaniciModeli.EtiketListesi = servis.KullanicininEtiketleri(kulID).ToList(); kullaniciModeli.FavoriSorular = servis.FavoriSorular(kulID).ToList(); kullaniciModeli.FavoriCevaplar = servis.FavoriCevaplar(kulID).ToList(); return(View(kullaniciModeli)); } return(RedirectToAction("Index", "Home")); }