Example #1
0
        public async Task CreateCategoryAsync()
        {
            var category = new Category.Entities.Category(
                _guids[1].ToString(),
                "奇幻"
                );

            await _categoryRepository.InsertAsync(category);
        }
Example #2
0
 public static MenuSection CreateMenuSectionWithCategory(string sectionName, Menu menu, Category.Entities.Category category)
 {
     if (menu.Id == 0)
     {
         throw new NullReferenceException(nameof(menu));
     }
     return(new MenuSection()
     {
         SectionName = sectionName,
         Menu = menu,
         Category = category
     });
 }