23 lines
		
	
	
		
			688 B
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			688 B
		
	
	
	
		
			C#
		
	
	
| using Microsoft.EntityFrameworkCore;
 | |
| using Microsoft.EntityFrameworkCore.Metadata.Builders;
 | |
| 
 | |
| 
 | |
| namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
 | |
| {
 | |
|     //public class SubjectConfigration : IEntityTypeConfiguration<Subject>
 | |
|     //{
 | |
| 
 | |
| 
 | |
|     //    public void Configure(EntityTypeBuilder<Subject> builder)
 | |
|     //    {
 | |
| 
 | |
|     //        //不能同时配置一对多 和一对一 但是有时表要存储多的最新的  比如受试者 最新的访视  在这里要显示配置
 | |
|     //        builder.HasOne(s => s.LatestSubjectVisit);
 | |
|     //        builder.HasOne(s => s.FinalSubjectVisit);
 | |
|     //        builder.HasMany(s => s.SubejectVisitList).WithOne(sv => sv.Subject);
 | |
|     //    }
 | |
|     //}
 | |
| 
 | |
| 
 | |
| }
 |