Ejemplo n.º 1
0
        private async Task UpdateCharacter(Data.Model.Character character, JikanDotNet.Character characterParsedData)
        {
            character.Name       = characterParsedData.Name;
            character.About      = characterParsedData.About;
            character.ImageUrl   = characterParsedData.ImageURL;
            character.NameKanji  = characterParsedData.NameKanji;
            character.Popularity = characterParsedData.MemberFavorites;

            character.ImageUrl = EmptyStringIfPlaceholder(characterParsedData.ImageURL);

            if (characterParsedData.Nicknames.Any())
            {
                character.Nicknames = string.Join(';', characterParsedData.Nicknames.ToArray());
            }

            characterRepository.Update(character);

            await characterRepository.CommitAsync();
        }