44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
// using System;
|
|
// using System.Collections.Generic;
|
|
// using System.Linq;
|
|
// using System.Threading.Tasks;
|
|
// using Bogus;
|
|
// using Domain.Entities;
|
|
// using Microsoft.EntityFrameworkCore;
|
|
// using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
// namespace Auth.Domain.Configuration;
|
|
|
|
// public class BundleConfiguration : IEntityTypeConfiguration<Bundle>
|
|
// {
|
|
// // private readonly int count;
|
|
|
|
// public List<Bundle> Bundles { get; set; }
|
|
|
|
// public BundleConfiguration(int count)
|
|
// {
|
|
// // this.count = count;
|
|
// Bundles = GenerateBundles(count);
|
|
// }
|
|
|
|
// private List<Bundle> GenerateBundles(int count)
|
|
// {
|
|
// var fakerCategory = new Faker<Bundle>()
|
|
// .RuleFor(p => p.Id, f => Guid.NewGuid())
|
|
// .RuleFor(p => p.Name, f => f.Commerce.ProductName())
|
|
// .RuleFor(p => p.Description, f => f.Commerce.ProductDescription())
|
|
// .RuleFor(p => p.Photo, f => f.Image.LoremFlickrUrl(640, 480, "bundle"))
|
|
// .RuleFor(p => p.Language, f => "test")
|
|
// .RuleFor(p => p.CategoryId, f => f.Random.Number(1, 30));
|
|
|
|
// return fakerCategory.Generate(count);
|
|
// }
|
|
|
|
// public void Configure(EntityTypeBuilder<Bundle> builder)
|
|
// {
|
|
// ////builder.HasIndex(category => category.Name).IsUnique();
|
|
// //builder.Property(c => c.Name).HasMaxLength(450);
|
|
// builder.HasData(Bundles);
|
|
// }
|
|
// }
|