示例#1
0
        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));
        }
示例#2
0
 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());
 }