public Task UpdateUser(UserDataEntity user)
        {
            var deletedUser = _users.FirstOrDefault(u => u.Id == user.Id);

            try
            {
                DeleteUser(user.Id);
                AddUser(user);
            }
            catch (Exception)
            {
                if (!_users.Any(u => u.Id == deletedUser.Id))
                {
                    AddUser(deletedUser);
                }

                throw;
            }


            return(Task.CompletedTask);
        }