예제 #1
0
        public int addComment(Comment comment)
        {
            int status = 0;

            db.Comment.Add(comment);
            db.SaveChanges();

            return(status);
        }
예제 #2
0
        public int addRating(Rating rat)
        {
            int status = 0;

            db.Rating.Add(rat);
            db.SaveChanges();

            return(status);
        }
예제 #3
0
        public int addSubmission(Submission submission)
        {
            int status = 0;

            db.Submission.Add(submission);
            db.SaveChanges();

            return(status);
        }
예제 #4
0
        public int addProblemTestCase(ProblemTestCase problemTestCase)
        {
            int status = 0;

            db.ProblemTestCase.Add(problemTestCase);
            db.SaveChanges();

            return(status);
        }
예제 #5
0
        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);
        }