public IActionResult UserAppInsert([FromBody] UserAppViewModel model)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                var userApp = model.UserViewModelToUser();

                userApp = _services.UserAppInsert(userApp);

                return(Ok(userApp));
            }
            catch (DataErrorException ex)
            {
                return(StatusCode(500, ex.MessageInnerException));
            }
            catch (ExceptionBusiness ex)
            {
                return(StatusCode(500, ex.Message));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
        public IActionResult UserAppUpdate([FromBody] UserAppViewModel model)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                var userApp = model.UserViewModelToUser();

                userApp = _services.UserAppUpdate(userApp);

                if (userApp == null)
                {
                    return(NotFound($"User id {model.UserId} not Found"));
                }

                return(Ok(userApp));
            }
            catch (DataErrorException ex)
            {
                return(StatusCode(500, ex.MessageInnerException));
            }
            catch (ExceptionBusiness ex)
            {
                return(StatusCode(500, ex.Message));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }