public IHttpActionResult Delete(int id) { Customer cust = sclient.GetById(id); sclient.Delete(cust); sclient.Commit(); return(Ok("Index")); }
public ActionResult Create(ClientViewModel collection) { Customer cust = new Customer(); cust.type = collection.type; cust.description = collection.description; cust.category = collection.category; cust.speciality = collection.speciality; service.Add(cust); service.Commit(); return(RedirectToAction("Index")); }