< Summary

Information
Class: Syki.Back.Features.Cross.CreateInstitution.InstitutionConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Cross/CreateInstitution/InstitutionConfig.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 34
Uncovered lines: 0
Coverable lines: 34
Total lines: 54
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Configure(...)100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Cross/CreateInstitution/InstitutionConfig.cs

#LineLine coverage
 1using Syki.Back.Features.Cross.CreateUser;
 2
 3namespace Syki.Back.Features.Cross.CreateInstitution;
 4
 5public class InstitutionConfig : IEntityTypeConfiguration<Institution>
 6{
 7    public void Configure(EntityTypeBuilder<Institution> institution)
 8    {
 29        institution.ToTable("institutions");
 10
 211        institution.HasKey(f => f.Id);
 212        institution.Property(f => f.Id).ValueGeneratedNever();
 13
 214        institution.HasMany(f => f.AcademicPeriods)
 215            .WithOne()
 216            .HasForeignKey(p => p.InstitutionId);
 17
 218        institution.HasMany(f => f.Campi)
 219            .WithOne()
 220            .HasForeignKey(c => c.InstitutionId);
 21
 222        institution.HasMany(f => f.Courses)
 223            .WithOne()
 224            .HasForeignKey(c => c.InstitutionId);
 25
 226        institution.HasMany(f => f.CourseOfferings)
 227            .WithOne()
 228            .HasForeignKey(co => co.InstitutionId);
 29
 230        institution.HasMany(f => f.CourseCurriculums)
 231            .WithOne()
 232            .HasForeignKey(g => g.InstitutionId);
 33
 234        institution.HasMany(f => f.Disciplines)
 235            .WithOne()
 236            .HasForeignKey(d => d.InstitutionId);
 37
 238        institution.HasMany(f => f.Teachers)
 239            .WithOne()
 240            .HasForeignKey(p => p.InstitutionId);
 41
 242        institution.HasMany(f => f.Students)
 243            .WithOne()
 244            .HasForeignKey(a => a.InstitutionId);
 45
 246        institution.HasMany<SykiUser>()
 247            .WithOne()
 248            .HasForeignKey(u => u.InstitutionId);
 49
 250        institution.HasMany(f => f.Notifications)
 251            .WithOne()
 252            .HasForeignKey(n => n.InstitutionId);
 253    }
 54}