Example #1
0
 public static async Task UpdateExisting(IRepository repo)
 {
     foreach (var character in await repo.Characters)
     {
         var updatedChar = await repo.CharacterFromApi(character.ApiKey, (int)character.Id);
         CheckNotifications(repo, updatedChar);
         repo.Replace(character, updatedChar);
     }
 }
Example #2
0
 public static async Task AddNew(IRepository repo, model.ApiKey apiKey, int charId)
 {
     var character = await repo.CharacterFromApi(apiKey, charId);
     repo.AddCharacter(character);
 }