public async Task CreateCategoryAsync() { var category = new Category.Entities.Category( _guids[1].ToString(), "奇幻" ); await _categoryRepository.InsertAsync(category); }
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 }); }