Example #1
0
        public async Task <bool> DeleteByUserIdAsync(string userId)
        {
            //get account
            //verify
            var accountEntity = await _accountStore.GetByUserIdAsync(userId);

            accountEntity.EnsureValid(userId);

            var isDeleted = await _accountStore.DeleteByUserIdAsync(userId);

            isDeleted.EnsureDeleted();
            return(isDeleted);
        }