コード例 #1
0
        public IHttpActionResult Delete(int id)
        {
            Customer cust = sclient.GetById(id);

            sclient.Delete(cust);
            sclient.Commit();
            return(Ok("Index"));
        }
コード例 #2
0
        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"));
        }