public ActionResult Create([Bind(Include = "ID, Title, Contact")] Client client) { if (ModelState.IsValid) { clients.Add(client); return(RedirectToAction("Index")); } return(View()); }
public void Execute() { try { ClientRepo.Add(Entity); Scope.Complete(); } catch (NullReferenceException e) { Rollback(); throw e; } catch (TransactionException e) { Rollback(); throw new InvalidOperationException("Add entity faild ", e); } }