using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Data.DAO; using Microsoft.EntityFrameworkCore; namespace data.Repository { public class SQLPresenceRepository { private readonly RemoteDatabaseContext _dbContext; public SQLPresenceRepository(RemoteDatabaseContext remoteDatabaseContext) { _dbContext = remoteDatabaseContext; } public IEnumerable GetAllPresences() { var result = _dbContext.Attendances .Include(attendance => attendance.GroupSubject) .ThenInclude(groupSubject => groupSubject.Subject) .Include(groupSubject => groupSubject.GroupSubject.Semester) .Include(attendance => attendance.Student) .Include(attendance => attendance.Group) .Include(attendance => attendance.Visit); return result; } } }