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()); }
public ActionResult List() { var data = mr.List(); return(View(data)); }