コード例 #1
0
        public ActionResult modelEkle()
        {
            KategoriRepository repoKategori = new KategoriRepository();
            var a = repoKategori.List().Select(x => new SelectListItem {
                Text = x.KATEGORI_ADI, Value = x.ID.ToString()
            }).ToList();
            MarkaRepository repoMarka = new MarkaRepository();
            var             b         = repoMarka.List().Select(x => new SelectListItem {
                Text = x.MARKA_ADI, Value = x.ID.ToString()
            }).ToList();

            ViewBag.kategoriList = a;
            ViewBag.markaList    = b;
            return(View());
        }
コード例 #2
0
ファイル: MarkaController.cs プロジェクト: Sumeye/RentACar
        public ActionResult List()
        {
            var data = mr.List();

            return(View(data));
        }