Exemplo n.º 1
0
        public async Task <ActionResult <LotModel> > Search(string searchQuery)
        {
            var lots = await _lotService.GetAll();

            var filteredLots = lots.Where(l => l.Title.Contains(searchQuery));

            var result = _mapper.Map <IEnumerable <LotModel> >(filteredLots);

            return(Ok(result));
        }
Exemplo n.º 2
0
 public void Execute(IJobExecutionContext context)
 {
     Debug.Print("Background");
     log.Debug("Background");
     try
     {
         var lots = lotService.GetAll();
         foreach (var lot in lots)
         {
             if ((DateTime.Now.Date >= lot.EndDate.Date) && (lot.IsActive == true) && (lot.IsChecked == true))
             {
                 ProcessLot(lot);
             }
         }
     }
     catch (SystemException ae)
     {
         log.Error("Error (mail sending): " + ae.ToString());
     }
 }