public async Task CheckSolution(string userId, string code, int problemId, string inputVariables) { var codeFile = WriteCodeToFile(userId, code, inputVariables); var inputsOutputs = await ProblemAccessor.GetExpectedInputsOutputs(problemId); await Task.Run(() => ExecuteSolution(codeFile, inputsOutputs)); File.Delete(codeFile); }
public IQueryable <ProblemVO> GetAll() { IQueryable <ProblemVO> qProblem; using (var problemAccessor = new ProblemAccessor()) { qProblem = problemAccessor.Repo.All; } return(qProblem); }
public List <ProblemVO> FindAll() { List <ProblemVO> problermList; using (var problemAccessor = new ProblemAccessor()) { problermList = problemAccessor.Repo.All.ToList(); } return(problermList); }
public ProblemBL() { _problemAccessor = new ProblemAccessor(); }