public ActionResult Sattiklarim()
        {
            UrunYonetici uy   = new UrunYonetici();
            Kullanici    klnc = Session["giris"] as Kullanici;

            if (Session["giris"] == null)
            {
                return(RedirectToAction("Giris", "Home"));
            }
            List <Urun> urnler = uy.List(x => x.kullaniciId == klnc.kullaniciId).OrderByDescending(x => x.satistarihsaat).ToList();

            return(View(urnler));
        }
        public ActionResult UrunListele(long?id)
        {
            Kullanici admin = AdminMi();

            if (admin == null)
            {
                return(RedirectToAction("Giris", "Home"));
            }
            else
            {
                if (!admin.adminmi)
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }
            List <Urun> urnler = uy.List(x => x.kategoriId == id.Value).OrderByDescending(x => x.satistarihsaat).ToList();

            if (urnler.Count == 0)
            {
                kat = ky.Find(x => x.kategoriId == id.Value);
                ViewData["katadi"] = kat.kategoriAdi;
            }
            return(View(urnler));
        }