< Summary

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

#LineLine coverage
 1using Syki.Back.Features.Academic.CreateCourse;
 2
 3namespace Syki.Back.Features.Academic.CreateDiscipline;
 4
 5public class CourseDisciplineConfig : IEntityTypeConfiguration<CourseDiscipline>
 6{
 7    public void Configure(EntityTypeBuilder<CourseDiscipline> cd)
 8    {
 29        cd.ToTable("courses__disciplines");
 10
 211        cd.HasKey(x => new { x.CourseId, x.DisciplineId });
 12
 213        cd.HasOne<Course>()
 214            .WithMany(c => c.Links)
 215            .HasPrincipalKey(x => x.Id)
 216            .HasForeignKey(x => x.CourseId);
 17
 218        cd.HasOne<Discipline>()
 219            .WithMany(d => d.Links)
 220            .HasPrincipalKey(x => x.Id)
 221            .HasForeignKey(x => x.DisciplineId);
 222    }
 23}