Skip to content

Instantly share code, notes, and snippets.

@moaschterle
Created March 20, 2013 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save moaschterle/5204993 to your computer and use it in GitHub Desktop.
Save moaschterle/5204993 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Intranet
{
public static class MenuExtensions
{
public static IMenu NextParent(this IMenu menu)
{
return (from xy in menu where xy.Level == Level orderby xy.Order select xy).AsEnumerable().SkipWhile(n => n.Order <= Order).Take(1).FirstOrDefault();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment