30 lines
		
	
	
		
			847 B
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			847 B
		
	
	
	
		
			C#
		
	
	
| using IRaCIS.Core.Domain.Models;
 | |
| using Microsoft.EntityFrameworkCore;
 | |
| using Microsoft.EntityFrameworkCore.Metadata.Builders;
 | |
| 
 | |
| 
 | |
| namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
 | |
| {
 | |
|     public class NoneDicomStudyConfigration : IEntityTypeConfiguration<NoneDicomStudy>
 | |
|     {
 | |
| 
 | |
| 
 | |
|         public void Configure(EntityTypeBuilder<NoneDicomStudy> builder)
 | |
|         {
 | |
|             //   builder
 | |
|             // .HasMany(s => s.TrialSiteUserList)
 | |
|             //.WithOne(c => c.DicomStudy)
 | |
|             //.HasForeignKey(s => new { s.TrialId, s.SiteId })
 | |
|             //.HasPrincipalKey(c => new { c.TrialId, c.SiteId });
 | |
| 
 | |
| 
 | |
|             builder
 | |
|         .HasOne(s => s.TrialSite)
 | |
|         .WithMany(c => c.NoneDicomStudyList)
 | |
|         .HasForeignKey(s => new { s.TrialId, s.SiteId })
 | |
|         .HasPrincipalKey(c => new { c.TrialId, c.SiteId });
 | |
| 
 | |
|         }
 | |
|     }
 | |
| }
 |