Exemplo n.º 1
0
        public ActionResult CreateOrUpdateAction(string id)
        {
            var model = new AppActionViewModel();

            if (id != null)
            {
                using (var context = new AppSecurityContext())
                {
                    var repository = new ActionRepository(context);
                    var action     = repository.Find(id);
                    model = mapper.Map <AppActionViewModel>(action);
                    return(View(model));
                }
            }
            return(View(model));
        }