public IEnumerable <StudentEvent> GetAll() { var entities = _studentEventRepository.GetAll().ToList(); var result = new List <StudentEvent>(); foreach (var entity in entities) { result.Add(StudentEventMapper.FromEntity(entity)); } return(result); }
public StudentEvent GetById(int id) { var entity = _studentEventRepository.Get(id); return(StudentEventMapper.FromEntity(entity)); }