public ActionResult DodajTipTelefona(TipTelefonaViewModel tipT) { if (ModelState.IsValid) { var tt = new TipTelefona { IdTipaTelefona = tipT.IdTipaTelefona, Tip = tipT.Tip }; _context.TipTelefona.Add(tt); _context.SaveChanges(); return(RedirectToAction("Index", "TipTelefona")); } return(View(tipT)); }
public ActionResult DodajTipTelefona() { var tvm = new TipTelefonaViewModel(); return(View(tvm)); }