public QuestionPropositionTO Update(QuestionPropositionTO Entity) { if (Entity is null) { throw new Exception(); } return(evaluationContext.QuestionPropositions.Update(Entity.ToEF()).Entity.ToTransfertObject()); }
public QuestionPropositionTO Add(QuestionPropositionTO Entity) { if (Entity is null) { throw new ArgumentNullException(nameof(Entity)); } var questionproposition = Entity.ToEF(); questionproposition.Question = evaluationContext.Questions.FirstOrDefault(q => q.Id == Entity.QuestionId); return(evaluationContext.QuestionPropositions.Add(questionproposition).Entity.ToTransfertObject()); }