Esempio n. 1
0
        private void UpdateFriends(Character character)
        {
            foreach (var friendship in character.Friends)
            {
                _context.Friendships.Add(new Friendship {
                    Character = friendship.Friend, Friend = character
                });
            }

            _context.SaveChanges();
        }
 public EpisodeBuilder SaveChanges(StarWarsSampleAppDbContext context)
 {
     context.Episodes.AddRange(_episodes);
     context.SaveChanges();
     return(this);
 }
Esempio n. 3
0
 public CharacterBuilder SaveChanges(StarWarsSampleAppDbContext context)
 {
     context.Characters.AddRange(_characters);
     context.SaveChanges();
     return(this);
 }