using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Data.DAO; using data.Repository; namespace domain.Service { public class PresenceService { private readonly SQLPresenceRepository _presenceRepository; public PresenceService(SQLPresenceRepository presenceRepository) { _presenceRepository = presenceRepository; } public List GetAllAttendances() { return _presenceRepository.GetAllPresences().ToList(); } public List GetAttendancesRelativeWithGroup(int groupId) { return _presenceRepository.GetAllPresences().Where(pres => pres.Group.GroupId == groupId).ToList(); } } }