public async Task <IActionResult> EditUser(UserBindingModel model) { IIndividualResponsitory individual = new IndividualResponsitory(_userManager, _context); var user = individual.GetIndividualsByName(model.UserName); await individual.EditAsync(user.Id, model); return(View("Edit")); }
public IActionResult GetInfo(string username) { IIndividualResponsitory userRepository = new IndividualResponsitory(_userManager, _context); var userInfo = userRepository.GetIndividualsByName(username); var viewModel = new UserBindingModel { UserName = userInfo.UserName, FullName = userInfo.Name, PhoneNumber = userInfo.PhoneNumber, Birthday = userInfo.Birthday, Identity = userInfo.Identity, DateOfIssue = userInfo.DateOfIssue, PlaceOfIssue = userInfo.PlaceOfIssue, Address = userInfo.Address, RolePersonal = userInfo.RolePersonal, Organization = userInfo.Organization, OrgAddress = userInfo.OrgAddress, Email = userInfo.Email }; return(Ok(viewModel)); }