Пример #1
0
 public static MenuOptions GetInstance()
 {
     if (_instance == null)
     {
         _instance = FindObjectOfType <MenuOptions>();
         ItemsTags.Init();
     }
     return(_instance);
 }
Пример #2
0
        public IQueryable GetItemsByTagId(int tag_id)
        {
            var items = Items.Where(i => (ItemsTags.Where(
                                              it => it.tag_id == tag_id)
                                          .Select(it => it.item_id)
                                          .Distinct()
                                          )
                                    .Contains(i.id));

            return(items);
        }