예제 #1
0
 private async Task AddChildrenInList(IEnumerable <string> names, string lastName, string adultId)
 {
     foreach (var name in names)
     {
         if (!await _manager.ChildExists(name, lastName, adultId))
         {
             _children.Add(await _manager.AddChildForUser(name, lastName, adultId));
         }
         else
         {
             _children.Add(await _manager.GetChild(name, lastName, adultId));
         }
     }
 }