public void InsertVisitors(Venue entity) { InstagramUser insertedInstagramUser; foreach (var instagramUser in entity.Visitors) { var storedInstagramUser = _instagramUserRepository.GetByInstagramId(instagramUser.InstagramId); if (storedInstagramUser == null) { insertedInstagramUser = _instagramUserRepository.Insert(instagramUser); _venueRepository.InsertVisitor(insertedInstagramUser, entity); } else { _venueRepository.InsertVisitor(storedInstagramUser, entity); } } }
public InstagramUser Insert(InstagramUser entity) { return(_instagramUserRepository.Insert(entity)); }