initial commit

This commit is contained in:
2026-07-21 14:41:46 +07:00
commit 1bfa3dd1c2
1159 changed files with 88228 additions and 0 deletions
@@ -0,0 +1,29 @@
using Indotalent.Data.Entities;
using Microsoft.EntityFrameworkCore;
namespace Indotalent.Infrastructure.Database.Demo;
public static class ProductGroupSeeder
{
public static async Task GenerateDataAsync(AppDbContext context)
{
if (await context.ProductGroup.AnyAsync()) return;
var productGroups = new List<ProductGroup>
{
new ProductGroup { Name = "Hardware" },
new ProductGroup { Name = "Networking" },
new ProductGroup { Name = "Storage" },
new ProductGroup { Name = "Device" },
new ProductGroup { Name = "Software" },
new ProductGroup { Name = "Service" }
};
foreach (var productGroup in productGroups)
{
await context.ProductGroup.AddAsync(productGroup);
}
await context.SaveChangesAsync();
}
}