21 lines
718 B
C#
21 lines
718 B
C#
using Company.Domain.WorkingHoursTempAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CompanyManagment.EFCore.Mapping;
|
|
|
|
public class WorkingHoursTempMapping :IEntityTypeConfiguration<WorkingHoursTemp>
|
|
{
|
|
public void Configure(EntityTypeBuilder<WorkingHoursTemp> builder)
|
|
{
|
|
builder.ToTable("WorkingHoursTemp");
|
|
builder.HasKey(x => x.id);
|
|
|
|
builder.Property(x => x.ShiftWork).HasMaxLength(2);
|
|
builder.Property(x => x.WorkShopAddress2).HasMaxLength(500);
|
|
|
|
builder.HasMany(x => x.WorkingHoursTempItemList)
|
|
.WithOne(x => x.WorkingHoursTemp)
|
|
.HasForeignKey(x => x.WorkingHoursTempId);
|
|
}
|
|
} |