public ActionResult UrunGuncelle(int id) { List <SelectListItem> kategoriler = new List <SelectListItem>(); foreach (Kategori item in _kategoriService.GetAll()) { kategoriler.Add(new SelectListItem() { Text = item.KategoriAdi, Value = item.KategoriId.ToString() }); } ViewBag.Kategoriler = kategoriler; List <SelectListItem> markalar = new List <SelectListItem>(); foreach (Marka item in _markaService.GetAll()) { markalar.Add(new SelectListItem() { Text = item.MarkaAdi, Value = item.MarkaId.ToString() }); } ViewBag.Markalar = markalar; Urun urun = _urunService.GetByID(id); return(View(urun)); }
public ActionResult UrunDetay(int id) { Urun urun = _urunService.GetByID(id); return(View(urun)); }
public HttpResponseMessage Get(int id) { var urun = _urunService.GetByID(id); return(Request.CreateResponse(HttpStatusCode.OK, urun)); }