Example #1
0
        public IEnumerable <ErrorLog> UpdateStatusForMatchingItems(int id, ErrorItemStatus status)
        {
            var coll = GetMatchingErrorItems(id).ToList();

            coll.ForEach(e => e.Status = status.ToString());
            coll.ForEach(e => UpdateErrorItem(e));
            _context.SaveChanges();
            return(coll.OrderByDescending(e => e.ErrorDate).ToList());
        }
Example #2
0
 public IEnumerable <ErrorLog> GetErrorItemsByStatus(ErrorItemStatus status)
 {
     return(_context.ErrorLogs.Where(e => e.Status == status.ToString()));
 }