public ActionResult Create(client client) { try { conn.clients.Add(client); conn.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(pkopkop.update update) { try { var contName = update.clientid; if (contName <= 0) { } update.createdby = User.Identity.Name; conn.updates.Add(update); conn.SaveChanges(); // TODO: Add insert logic here return(RedirectToAction("Index")); } catch { return(View()); } }