public ActionResult Index(int page = 1, int pageSize = 3)
        {
            var KuryeList = db.Kurye.ToList();
            //List<KuryeModel> resultModel = new List<KuryeModel>(); //paged list icin
            var resultModel = new List <KuryeModel>();
            var KuryeModel  = new KuryeModel();

            foreach (var item in KuryeList)
            {
                KuryeModel = new KuryeModel()
                {
                    Id      = item.Id,
                    Ad      = item.Ad,
                    Soyad   = item.Soyad,
                    Telefon = item.Telefon,
                    Durum   = item.Durum
                };
                resultModel.Add(KuryeModel);
            }
            PagedList <KuryeModel> pagedKuryeModel = new PagedList <KuryeModel>(resultModel, page, pageSize);//paged list icin

            //pagedAndNormalModel.NormalKuryeModel = resultModel;  //paged list icin
            //pagedAndNormalModel.PagedKuryeModel = new PagedList<KuryeModel>(resultModel, page, pageSize); //paged list icin
            return(View(pagedKuryeModel));
        }
        public ActionResult KuryeEkle(KuryeModel p1)
        {
            //if (!ModelState.IsValid)
            //{
            //    return View("KuryeEkle");
            //}
            var kurye = new Kurye();

            kurye.Ad      = p1.Ad;
            kurye.Soyad   = p1.Soyad;
            kurye.Telefon = p1.Telefon;
            kurye.Durum   = p1.Durum;

            db.Kurye.Add(kurye);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }