public ActionResult CreateVetura(VeturaCreate vetura) { if (ModelState.IsValid) { DAL_Vetura.AddVetura(vetura); } return(RedirectToAction("Index", "Brendis")); }
public ActionResult Veturat(int id) { List <VM_VeturaWithLlojet> listveturat; listveturat = DAL_Vetura.GetAllVeturasByBrandID(id); ViewBag.id = id; ViewBag.Brendi = DAL_Brendet.GetBrendByID(id); return(View(listveturat)); }
public JsonResult GetAllVeturasByBrandID(int id) { var result = DAL_Vetura.GetAllVeturasByBrandID(id); return(Json(result, JsonRequestBehavior.AllowGet)); }