KoogleApp/Koogle.Infrastructure_OLD/Data/Configurations/DayConfiguration.cs

30 lines
718 B
C#

using KoogleApp.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
namespace Koogle.Infrastructure.Data.Configurations
{
public class DayConfiguration : IEntityTypeConfiguration<Day>
{
public void Configure(EntityTypeBuilder<Day> builder)
{
builder.ToTable("Days");
builder.HasKey(d => d.Id);
// Index für bessere Performance
builder.HasIndex(e => e.PostDate);
builder.HasIndex(e => e.IsDeleted);
}
}
}