public ActionResult Dodaj() { SaveziDodajVM model = new SaveziDodajVM { }; return(View("Dodaj", model)); }
public ActionResult SpremiNoviSavez(SaveziDodajVM model) { Savezi savez = new Savezi(); savez.isDeleted = false; savez.Naziv = model.Naziv; ctx.Savezi.Add(savez); ctx.SaveChanges(); return(RedirectToAction("Index")); }