public int Insert(Model.ExamQuestion model) { var DetailQues = context.ExamQuestions .Where(q => q.QuestionId == model.QuestionId && q.ExamId == model.ExamId).ToList(); if (DetailQues.Count <= 0) { context.ExamQuestions.Add(model); return(context.SaveChanges()); } return(0); }
public int Insert(Model.ExamQuestion model) { return(repository.Insert(model)); }