public void UpdateUserProfile(EditProfileViewModel currUser) { ApplicationUser userToUpdate = _repo.Query<ApplicationUser>().Where(m => m.UserName == currUser.User.UserName).FirstOrDefault(); userToUpdate.FirstName = currUser.User.FirstName; userToUpdate.LastName = currUser.User.LastName; userToUpdate.Email = currUser.User.Email; userToUpdate.UserAddress = new Address { Street = currUser.Street, City = currUser.City, State = (Domain.StName)currUser.State, Zip = currUser.Zip }; _repo.SaveChanges(); }
public EditProfileViewModel GetEditProfileViewModel(string userName) { var user = GetDTOMemberByUserName(userName); var address = GetUserAddress(userName); var vm = new EditProfileViewModel { City = address.City, State = address.State, Street = address.Street, User = user, Zip = address.Zip }; return vm; }