Example #1
0
 public ActionResult Create(client client)
 {
     try
     {
         conn.clients.Add(client);
         conn.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #2
0
        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());
            }
        }