public void AddExercises(Exercises exercises) { if (exercises.Id == Guid.Empty) { exercises.Id = Guid.NewGuid(); } _context.Add(exercises); }
public void AddQuestion(Questions question) { if (question.Id == Guid.Empty) { question.Id = Guid.NewGuid(); } if (question.Answers != null) { foreach (var item in question.Answers) { if (item.Id == Guid.Empty) { item.Id = Guid.NewGuid(); } } } _context.Add(question); }
public void CreateLevel(Levels levels) { _context.Add(levels); }