public static DishItem GetDishItemByRowGUID(string rowGuid) { IEnumerable <AppModel.MenuItem> mFolders = (IEnumerable <AppModel.MenuItem>)AppLib.GetAppGlobalValue("mainMenu"); DishItem retVal; foreach (AppModel.MenuItem menuItem in mFolders) { if ((retVal = menuItem.Dishes.FirstOrDefault <DishItem>(d => d.RowGUID.ToString() == rowGuid)) != null) { return(retVal); } } return(null); }