Ejemplo n.º 1
0
        public IActionResult Save(UserTypeIndexViewModel model)
        {
            var userId = int.Parse(HttpContext.Session.GetString("UserId"));

            if (ModelState.IsValid)
            {
                var item = new UserType();
                item.Id          = model.Item.Id;
                item.Description = model.Item.Description;
                _Services.Save(item, userId);
            }
            return(RedirectToAction("Index"));
        }