28 lines
765 B
C#
28 lines
765 B
C#
|
|
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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|