Exemple #1
0
 public IList <ErrorOccurrence> GetByEnvironment(EnvironmentOccurrence environment)
 {
     try
     {
         return(_repository.GetByEnvironment(environment));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemple #2
0
        public List <ErrorOccurrence> GetByEnvironment(EnvironmentOccurrence environment)
        {
            var result = _context.ErrorOccurrences.Where(e => e.Environment == environment);

            if (result.Any())
            {
                return(result.ToList());
            }

            throw new Exception("Não há ocorrências de erro cadastradas.");
        }