コード例 #1
0
        public List <LiftViewModel> GetAll(string uid)
        {
            try
            {
                var         lifts = _liftRepository.GetAll(uid).ToList();
                DaysService ds    = new DaysService();

                List <LiftViewModel> viewModel = new List <LiftViewModel>();

                foreach (Lift lift in lifts)
                {
                    viewModel.Add(LiftMapper.MapLiftToViewModel(lift, uid));
                    //liftNames.FirstOrDefault(x => x.Id == l.LiftName.Id),
                    //liftTypes.FirstOrDefault(x => x.Id == l.LiftType.Id),
                    //uid));
                }

                return(viewModel);
            }
            catch (Exception ex)
            {
                _logger.LogError($"Inner Exception: {0}" + ex.InnerException);
            }
            return(null);
        }
コード例 #2
0
 public IEnumerable <LiftInfoDto> GetList()
 {
     return(_liftRepository.GetAll().Select(x => new LiftInfoDto(x)).ToList());
 }