示例#1
0
        public IEnumerable <BasePolicemanShiftVM> GetShifts()
        {
            Citizen user = _userService.GetUser();

            List <PoliceShift> shifts = _shiftRepo.GetAllAsIQueryable()
                                        .Where(x => x.PolicemanId == user.Policeman.Id)
                                        .ToList();

            return(_mapper.Map <List <BasePolicemanShiftVM> >(shifts));
        }