Exemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            BodyTypeDataAccess BodyTypeDataAccess = new BodyTypeDataAccess();
            BodyTypeModel      model = BodyTypeDataAccess.Read(id);

            return(View(model));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Register(BodyTypeModel model)
        {
            if (ModelState.IsValid)
            {
                BodyTypeDataAccess BodyTypeDataAccess = new BodyTypeDataAccess();
                BodyTypeDataAccess.Create(model);

                return(RedirectToAction("List", "BodyType"));
            }

            // If we got this far, something failed, redisplay form
            return(View(model));
        }