示例#1
0
        public async Task <ActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index", "Error"));
            }
            var model = await modelService.GetModelByIdAsync(id);

            if (model == null)
            {
                return(RedirectToAction("Index", "Error"));
            }
            return(View(model));
        }