Beispiel #1
0
 public static Object getAllCategory(Db.Category.CategoryDb.tbCategory y)
 {
     try
     {
         if (y.tbCategories.Count() != 0)
         {
             return(y.tbCategories.Select(x => new { x.Id, x.Name, x.ParentId, x.Description, Childrents = getAllCategory(x) }));
         }
     }
     catch (Exception)
     {
     }
     return(new List <Object>());
 }
Beispiel #2
0
 partial void DeletetbCategory(tbCategory instance);
Beispiel #3
0
 partial void UpdatetbCategory(tbCategory instance);
Beispiel #4
0
 partial void InserttbCategory(tbCategory instance);
Beispiel #5
0
 private void detach_tbCategories(tbCategory entity)
 {
     this.SendPropertyChanging();
     entity.tbCategory1 = null;
 }
Beispiel #6
0
 private void attach_tbCategories(tbCategory entity)
 {
     this.SendPropertyChanging();
     entity.tbCategory1 = this;
 }
Beispiel #7
0
        public static List <Db.Category.CategoryDb.tbCategory> GetChild(CategoryDbDataContext context, Db.Category.CategoryDb.tbCategory category)
        {
            var data = new List <Db.Category.CategoryDb.tbCategory>();

            foreach (var item in category.tbCategories)
            {
                data.Add(item);
                data.AddRange(GetChild(context, item));
            }
            return(data);
        }