15 lines
449 B
C#
15 lines
449 B
C#
namespace LiteCharms.Entities.Configuration;
|
|
|
|
public class ProductConfiguration : IEntityTypeConfiguration<Product>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Product> builder)
|
|
{
|
|
builder.ToTable(nameof(Product));
|
|
|
|
builder.HasKey(f => f.Id);
|
|
builder.Property(f => f.Name).IsRequired();
|
|
builder.Property(f => f.Description).IsRequired();
|
|
builder.Property(f => f.Active).HasDefaultValue(true);
|
|
}
|
|
}
|