예제 #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>());
 }
예제 #2
0
 partial void DeletetbCategory(tbCategory instance);
예제 #3
0
 partial void UpdatetbCategory(tbCategory instance);
예제 #4
0
 partial void InserttbCategory(tbCategory instance);
예제 #5
0
 private void detach_tbCategories(tbCategory entity)
 {
     this.SendPropertyChanging();
     entity.tbCategory1 = null;
 }
예제 #6
0
 private void attach_tbCategories(tbCategory entity)
 {
     this.SendPropertyChanging();
     entity.tbCategory1 = this;
 }
예제 #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);
        }