Пример #1
0
        public List <CategoryDTO> GetListCategory()
        {
            List <CategoryDTO> LsDTO = CategoryConvert.FromDBToDTO(CategoryDB.GetParent());

            foreach (CategoryDTO dto in LsDTO)
            {
                dto.ListChildCategory = GetChildCategory(int.Parse(dto.Id));
            }

            return(LsDTO);
        }
Пример #2
0
 public List <CategoryDTO> GetChildCategory(int Id)
 {
     return(CategoryConvert.FromDBToDTO(CategoryDB.GetChild(Id)));
 }
Пример #3
0
 public String AddCategory(CategoryDTO DTO)
 {
     return(CategoryDB.Add(CategoryConvert.FromDTOToDB(DTO)));
 }