public async Task AddSpeakers(List <SpeakerRequest> speakersRequest) { List <Speaker> speakers = new List <Speaker>(); foreach (var s in speakersRequest) { var speaker = new Speaker(s.Id, s.Title, s.Linkedin, s.Twitter, s.Site, s.Photo, s.Biography); var existingSpeaker = await _repository.GetSpeakerByName(speaker.Name); if (existingSpeaker == null) { speakers.Add(speaker); } } await _repository.Save(speakers); }
public int Save() { return(repo.Save()); }