public IList<PollAnswer> PollAnswers() { var pollAnswer1 = new PollAnswer() { Name = "Excellent", DisplayOrder = 1, }; var pollAnswer2 = new PollAnswer() { Name = "Good", DisplayOrder = 2, }; var pollAnswer3 = new PollAnswer() { Name = "Poor", DisplayOrder = 3, }; var pollAnswer4 = new PollAnswer() { Name = "Very bad", DisplayOrder = 4, }; var pollAnswer5 = new PollAnswer() { Name = "Daily", DisplayOrder = 5, }; var pollAnswer6 = new PollAnswer() { Name = "Once a week", DisplayOrder = 6, }; var pollAnswer7 = new PollAnswer() { Name = "Every two weeks", DisplayOrder = 7, }; var pollAnswer8 = new PollAnswer() { Name = "Once a month", DisplayOrder = 8, }; var entities = new List<PollAnswer> { pollAnswer1, pollAnswer2, pollAnswer3, pollAnswer4, pollAnswer5, pollAnswer6, pollAnswer7, pollAnswer8 }; this.Alter(entities); return entities; }
/// <summary> /// Deletes a poll answer /// </summary> /// <param name="pollAnswer">Poll answer</param> public virtual void DeletePollAnswer(PollAnswer pollAnswer) { if (pollAnswer == null) throw new ArgumentNullException("pollAnswer"); _pollAnswerRepository.Delete(pollAnswer); //event notification _eventPublisher.EntityDeleted(pollAnswer); }