< Summary

Information
Class: Syki.Back.Features.Student.CreateStudentEnrollment.ClassStudentConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Student/CreateStudentEnrollment/ClassStudentConfig.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 24
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/Student/CreateStudentEnrollment/ClassStudentConfig.cs

#LineLine coverage
 1using Syki.Back.Features.Academic.CreateClass;
 2using Syki.Back.Features.Academic.CreateStudent;
 3
 4namespace Syki.Back.Features.Student.CreateStudentEnrollment;
 5
 6public class ClassStudentConfig : IEntityTypeConfiguration<ClassStudent>
 7{
 8    public void Configure(EntityTypeBuilder<ClassStudent> classStudent)
 9    {
 210        classStudent.ToTable("classes__students");
 11
 212        classStudent.HasKey(t => new { t.ClassId, t.SykiStudentId });
 13
 214        classStudent.HasOne<Class>()
 215            .WithMany()
 216            .HasPrincipalKey(x => x.Id)
 217            .HasForeignKey(x => x.ClassId);
 18
 219        classStudent.HasOne<SykiStudent>()
 220            .WithMany()
 221            .HasPrincipalKey(x => x.Id)
 222            .HasForeignKey(x => x.SykiStudentId);
 223    }
 24}