public int addComment(Comment comment) { int status = 0; db.Comment.Add(comment); db.SaveChanges(); return(status); }
public int addRating(Rating rat) { int status = 0; db.Rating.Add(rat); db.SaveChanges(); return(status); }
public int addSubmission(Submission submission) { int status = 0; db.Submission.Add(submission); db.SaveChanges(); return(status); }
public int addProblemTestCase(ProblemTestCase problemTestCase) { int status = 0; db.ProblemTestCase.Add(problemTestCase); db.SaveChanges(); return(status); }
public Problem InsertProblem(Problem problem) { Difficulty diff = new Difficulty(); // diff.Name = "sample name"; //diff.Description = "sample description"; //db.Difficulty.Add(diff); db.Problem.Add(problem); db.SaveChanges(); return(problem); }