var result = table.OrderByDescending(x => x.Status).First();
public static T FirstWithMax<T, TValue>(this IEnumerable<T> items, Func<T, TValue> propSelector)
where TValue : IComparable<TValue>
{
return items.Aggregate((current, next) => propSelector.Invoke(current).CompareTo(propSelector.Invoke(next)) < 0 ? next : current);
}