< Summary

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

#LineLine coverage
 1using Syki.Back.Features.Academic.CreateStudent;
 2
 3namespace Syki.Back.Features.Student.CreateStudentEnrollment;
 4
 5public class ExamGradeConfig : IEntityTypeConfiguration<ExamGrade>
 6{
 7    public void Configure(EntityTypeBuilder<ExamGrade> examGrade)
 8    {
 29        examGrade.ToTable("exam_grades");
 10
 211        examGrade.HasKey(t => t.Id);
 212        examGrade.Property(t => t.Id).ValueGeneratedNever();
 13
 214        examGrade.HasIndex(t => new { t.ClassId, t.StudentId, t.ExamType })
 215            .IsUnique();
 16
 217        examGrade.HasOne<SykiStudent>()
 218            .WithMany()
 219            .HasForeignKey(t => t.StudentId);
 20
 221        examGrade.Property(x => x.Note).HasPrecision(4, 2);
 222    }
 23}