Files
Backend-Api/CompanyManagment.EFCore/Mapping/WorkshopTempMapping.cs

20 lines
640 B
C#

using Company.Domain.TemporaryClientRegistrationAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class WorkshopTempMapping : IEntityTypeConfiguration<WorkshopTemp>
{
public void Configure(EntityTypeBuilder<WorkshopTemp> builder)
{
builder.ToTable("WorkshopTemps");
builder.HasKey(x => x.id);
builder.Property(x => x.WorkshopName).HasMaxLength(255);
builder.HasMany(x => x.WorkshopServicesTemps)
.WithOne(x => x.WorkshopTemp)
.HasForeignKey(x => x.WorkshopTempId);
}
}