Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
using GozareshgirProgramManager.Domain.HolidayItemAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings;
|
||||
|
||||
public class HolidayItemMapping : IEntityTypeConfiguration<HolidayItem>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<HolidayItem> builder)
|
||||
{
|
||||
builder.ToTable("Holidayitems");
|
||||
builder.HasKey(x => x.Id);
|
||||
|
||||
builder.Property(x => x.HolidayYear).HasMaxLength(4);
|
||||
|
||||
builder.HasOne(x => x.Holidayss)
|
||||
.WithMany(x => x.HolidayItems)
|
||||
.HasForeignKey(x => x.HolidayId);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using GozareshgirProgramManager.Domain.HolidayAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings;
|
||||
|
||||
public class HolidayMapping : IEntityTypeConfiguration<Holiday>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Holiday> builder)
|
||||
{
|
||||
builder.ToTable("Holidays");
|
||||
builder.HasKey(x => x.Id);
|
||||
|
||||
builder.Property(x => x.Year).HasMaxLength(4);
|
||||
|
||||
builder.HasMany(x => x.HolidayItems)
|
||||
.WithOne(x => x.Holidayss)
|
||||
.HasForeignKey(x => x.HolidayId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user