mh_frame_sps/APT.DAL.Data/PhoneMap.cs

28 lines
765 B
C#
Raw Permalink Normal View History

2026-04-07 13:47:52 +08:00
using APT.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Text;
namespace APT.DAL.Data
{
public class PhoneMap : IEntityTypeConfiguration<APT_Test_Phone>
{
//public PhoneMap(ModelBuilder builder)
//{
// builder.Entity<APT_Test_Phone>()
// .HasOne(o => o.TestUser)
// .WithMany()
// .HasForeignKey(o => o.TestUser_ID);
//}
public virtual void Configure(EntityTypeBuilder<APT_Test_Phone> builder)
{
builder.HasOne(o => o.Nav_TestUser)
.WithMany()
.HasForeignKey(o => o.TestUser_ID);
}
}
}