using Microsoft.EntityFrameworkCore; using SharedLibraryCore.Interfaces; using IW4MAdmin.Plugins.Stats.Models; namespace Stats.Models { public class ModelConfiguration : IModelConfiguration { public void Configure(ModelBuilder builder) { builder.Entity() .HasKey(cs => new { cs.ClientId, cs.ServerId }); // fix linking from SQLCe builder.Entity() .Property(c => c.ClientId) .HasColumnName("EFClientStatistics_ClientId"); builder.Entity() .Property(c => c.ServerId) .HasColumnName("EFClientStatistics_ServerId"); // force pluralization builder.Entity().ToTable("EFClientKills"); builder.Entity().ToTable("EFClientMessages"); builder.Entity().ToTable("EFClientStatistics"); builder.Entity().ToTable("EFHitLocationCounts"); builder.Entity().ToTable("EFServers"); builder.Entity().ToTable("EFServerStatistics"); } } }