Exemplo n.º 1
0
        public IActionResult Index()
        {
            var lots             = _lotRepository.GetAll();
            var lotSumViewModels = _mapper.Map <IEnumerable <Lot>, IEnumerable <LotSummaryViewModel> >(lots);

            return(View(lotSumViewModels));
        }
Exemplo n.º 2
0
 public IEnumerable <LotEntity> GetAllLotEntities()
 {
     try
     {
         return(_lotRepository.GetAll().Select(l => l.ToLotEntity()));
     }
     catch (Exception exception)
     {
         Log.LogError(exception);
         return(new List <LotEntity>());
     }
 }
 public IEnumerable <Lot> GetLots()
 {
     return(lotRepository.GetAll().ToList());
 }
 public IEnumerable <LotEntity> GetAllLots()
 {
     return(_lotRepository.GetAll().Select(lot => lot.ToBllLotEntity()));
 }