public List <MarkViewModel> GetMarks(DateTime dateFrom, DateTime dateTill, string schoolClassId, string subjectId) { var markList = _markRepository.GetMarks( dateFrom, dateTill, _hashidService.Decode(schoolClassId), _hashidService.Decode(subjectId) ); return(Mapper.Map <List <Mark>, List <MarkViewModel> >(markList)); }
public List <MarkViewModel> GetMarks(DateTime dateFrom, DateTime dateTill, string schoolClassId, string subjectId) { return(_markRepository.GetMarks( dateFrom, dateTill, _hashidService.Decode(schoolClassId), _hashidService.Decode(subjectId) ) .Select(m => new MarkViewModel { Date = m.Date, StudentId = _hashidService.Encode(m.StudentId), SubjectId = _hashidService.Encode(m.SubjectId), Value = m.Value.ToString() }).ToList()); }