public async Task <ActionResult <MemberDisplay?> > PostSave([ModelBinder(typeof(MemberBinder))] MemberSave contentItem)
        {
            if (contentItem == null)
            {
                throw new ArgumentNullException("The member content item was null");
            }

            // If we've reached here it means:
            // * Our model has been bound
            // * and validated
            // * any file attachments have been saved to their temporary location for us to use
            // * we have a reference to the DTO object and the persisted object
            // * Permissions are valid

            // map the properties to the persisted entity
            MapPropertyValues(contentItem);

            await ValidateMemberDataAsync(contentItem);

            // Unlike content/media - if there are errors for a member, we do NOT proceed to save them, we cannot so return the errors
            if (ModelState.IsValid == false)
            {
                MemberDisplay?forDisplay = _umbracoMapper.Map <MemberDisplay>(contentItem.PersistedContent);
                return(ValidationProblem(forDisplay, ModelState));
            }

            // Create a scope here which will wrap all child data operations in a single transaction.
            // We'll complete this at the end of this method if everything succeeeds, else
            // all data operations will roll back.
            using ICoreScope scope = _scopeProvider.CreateCoreScope();

            // Depending on the action we need to first do a create or update using the membership manager
            // this ensures that passwords are formatted correctly and also performs the validation on the provider itself.
            switch (contentItem.Action)
            {
            case ContentSaveAction.Save:
                ActionResult <bool> updateSuccessful = await UpdateMemberAsync(contentItem);

                if (!(updateSuccessful.Result is null))
                {
                    return(updateSuccessful.Result);
                }

                break;

            case ContentSaveAction.SaveNew:
                ActionResult <bool> createSuccessful = await CreateMemberAsync(contentItem);

                if (!(createSuccessful.Result is null))
                {
                    return(createSuccessful.Result);
                }

                break;

            default:
                // we don't support anything else for members
                return(NotFound());
            }

            // return the updated model
            MemberDisplay?display = _umbracoMapper.Map <MemberDisplay>(contentItem.PersistedContent);

            // lastly, if it is not valid, add the model state to the outgoing object and throw a 403
            if (!ModelState.IsValid)
            {
                return(ValidationProblem(display, ModelState, StatusCodes.Status403Forbidden));
            }

            // put the correct messages in
            switch (contentItem.Action)
            {
            case ContentSaveAction.Save:
            case ContentSaveAction.SaveNew:
                display?.AddSuccessNotification(
                    _localizedTextService.Localize("speechBubbles", "editMemberSaved"),
                    _localizedTextService.Localize("speechBubbles", "editMemberSaved"));
                break;
            }

            // Mark transaction to commit all changes
            scope.Complete();

            return(display);
        }