protected virtual async Task SeedProductCategoryMappingsAsync() { var product = await _productRepository.GetAsync( x => x.UniqueName == SampleDataConsts.CakeProductUniqueName); var category = await _categoryRepository.GetAsync( x => x.UniqueName == SampleDataConsts.FoodsCategoryUniqueName); if (await _productCategoryRepository.AnyAsync(x => x.ProductId == product.Id && x.CategoryId == category.Id)) { return; } await _productCategoryRepository.InsertAsync( new ProductCategory(_guidGenerator.Create(), _currentTenant.Id, category.Id, product.Id)); }