public IActionResult AddQuestion(QuestionData value) { var NewQuestion = new Question { Id = Guid.NewGuid(), Title = value.Title, DateAdded = value.DateAdded, Description = value.Description, CategoryId = value.CategoryId }; _questionRepository.AddEntity(NewQuestion); if (value.Images != null) { _imageRepository.AddImageToQuestion(value.Images, NewQuestion.Id); } return(Ok(new { QuestionId = NewQuestion.Id })); }