< Summary

Information
Class: Syki.Back.Features.Academic.CreateTeacher.SykiTeacherConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/CreateTeacher/SykiTeacherConfig.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 19
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/Academic/CreateTeacher/SykiTeacherConfig.cs

#LineLine coverage
 1using Syki.Back.Features.Cross.CreateUser;
 2
 3namespace Syki.Back.Features.Academic.CreateTeacher;
 4
 5public class SykiTeacherConfig : IEntityTypeConfiguration<SykiTeacher>
 6{
 7    public void Configure(EntityTypeBuilder<SykiTeacher> teacher)
 8    {
 29        teacher.ToTable("teachers");
 10
 211        teacher.HasKey(p => p.Id);
 212        teacher.Property(p => p.Id).ValueGeneratedNever();
 13
 214        teacher.HasOne<SykiUser>()
 215            .WithOne()
 216            .HasPrincipalKey<SykiUser>(u => new { u.InstitutionId, u.Id })
 217            .HasForeignKey<SykiTeacher>(p => new { p.InstitutionId, p.Id });
 218    }
 19}