Example #1
0
        public async Task <bool> Insert(LabelDTO newLabel)
        {
            if (newLabel != null)
            {
                QuestionLabel labelToAdd = new QuestionLabel()
                {
                    LabelText = newLabel.LabelText,
                    Question  = await questionRepository.GetAsync(newLabel.QuestionID)
                };

                return(await questionRepository.AddLabelAsync(labelToAdd));
            }
            else
            {
                return(false);
            }
        }