Пример #1
0
        public async Task <int> DeleteAllRoasterRequestsAsync()
        {
            try
            {
                _logger.Information("Roaster request service layer access in progress...");

                var range = await _roasterRequestRepository.GetListAsync();

                _roasterRequestRepository.DeleteRoasterRequest(range);
                await _roasterRequestRepository.SaveChangesAsync();

                _logger.Information($"Roaster requests table has been cleared.");
                return(0);
            }
            catch (Exception e)
            {
                _logger.Error($"Roaster request service layer error occured! Error text message: {e.Message}");
                return(-1);
            }
        }
Пример #2
0
 public async Task <IList <RoasterRequest> > GetRoasterRequests()
 {
     try
     {
         return(await _roasterRequestRepository.GetListAsync());
     }
     catch (Exception)
     {
         return(null);
     }
 }