-
-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathProblemsRepository.cs
More file actions
24 lines (21 loc) · 754 Bytes
/
ProblemsRepository.cs
File metadata and controls
24 lines (21 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace OJS.Data.Repositories
{
using System;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using OJS.Data.Models;
using OJS.Data.Repositories.Base;
using OJS.Data.Repositories.Contracts;
public class ProblemsRepository : DeletableEntityRepository<Problem>, IProblemsRepository
{
public ProblemsRepository(IOjsDbContext context)
: base(context)
{
}
public IQueryable<Problem> AllIncludesSubmissionsTestsAndResources(Expression<Func<Problem, bool>> orExpressionProblemIds)
{
return this.All().Where(orExpressionProblemIds).Include(p => p.Submissions).Include(p => p.Tests).Include(p => p.Resources);
}
}
}