public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }

            User user = _context.FindAsync(id);

            if (user == null)
            {
                return(RedirectToAction("Index"));
            }

            IEnumerable <Role> roleList = _context.Roles;

            UserViewModel userVM = new UserViewModel()
            {
                Id             = user.Id,
                IdentityNumber = user.IdentityNumber,
                Name           = user.Name,
                LastName       = user.LastName,
                Email          = user.Email,
                IsActive       = user.IsActive,
                Phone          = user.Phone,
                RoleId         = user.RoleId,
                Role           = new SelectList(roleList, "Id", "Name"),
            };

            return(View(userVM));
        }