Beispiel #1
0
        public IActionResult Edit(int id)
        {
            var model = _membersService.GetById(id);

            if (model == null)
            {
                return(RedirectToAction("Index"));
            }
            return(View(new MemberViewModel(model)));
        }
        public ActionResult Edit(Guid id)
        {
            MembersModel model = new MembersModel();
            var          info  = service.GetById(id);

            model = Mapper.Map <Members, MembersModel>(info);


            return(View(PluginHelper.GetViewPath(this.GetType(), "Edit"), model));
        }
        public IHttpActionResult GetById(int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var result = _membersService.GetById(id);

            return(Ok(result));
        }