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()); }
public IEnumerable <ErrorLog> GetErrorItemsByStatus(ErrorItemStatus status) { return(_context.ErrorLogs.Where(e => e.Status == status.ToString())); }