public void Create(Submission submission) { context.Submissions.Add(submission); int maxPoints = problemsService.GetProblemPoints(submission.ProblemId); submission.ArchievedResult = new Random().Next(0, maxPoints); context.SaveChanges(); }
public void Create(Submission submission) { context.Submissions.Add(submission); int maxPoints = problemsService.GetProblemPoints(submission.ProblemId); submission.ArchievedResult = new Random().Next(0, maxPoints); context.SaveChanges(); }