Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(long id)
        {
            if (id <= 0)
            {
                SetTempDataErrorMessage("You didn't select a valid record to edit. Please select an existing record to edit.");
                return(RedirectToAction("Index"));
            }

            var user = await _memberService.GetUserByIdAsync(id);

            var model         = new UserEditViewModel(user);
            var organizations = await _memberService.GetAllOrganizationsAsync();

            model.Organizations = organizations;

            return(View(model));
        }