private async void BtnSave_Clicked(object sender, EventArgs e)
        {
            var request = new AccountSettingsUpdateRequest();

            request.FirstName   = EntFirstName.Text;
            request.LastName    = EntLastName.Text;
            request.PhoneNumber = EntPhone.Text;
            request.Email       = EntEmail.Text;

            await APIService.UpdateAccountSettings(request);

            await Navigation.PopAsync();
        }
Exemple #2
0
        public Model.User UpdateAccountSettings(int id, AccountSettingsUpdateRequest request)
        {
            var entity = _context.User.FirstOrDefault(x => x.UserId == id);

            _context.User.Attach(entity);
            _context.User.Update(entity);

            _mapper.Map(request, entity);

            _context.SaveChanges();

            return(_mapper.Map <Model.User>(entity));
        }
Exemple #3
0
 public Model.User UpdateAccountSettings(int id, AccountSettingsUpdateRequest request)
 {
     return(_service.UpdateAccountSettings(id, request));
 }