Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • iknow-api/Data/AppDbContext.cs

    rc42181c r1b20b22  
    290290                e.HasKey(p => p.Id);
    291291                e.Property(p => p.Id).HasColumnName("id");
     292                e.Property(p => p.UserId).HasColumnName("user_id");
    292293                e.Property(p => p.EnrollmentInfoId).HasColumnName("enrollment_id");
    293294                e.Property(p => p.Amount).HasColumnName("amount");
    294295
    295                 // No user_id: the student comes from the enrolment. Removing it
    296                 // was the BCNF fix from Phase 5 (enrolled_id -> user_id).
     296                e.HasOne(p => p.User)
     297                 .WithMany(u => u.Payments)
     298                 .HasForeignKey(p => p.UserId)
     299                 .OnDelete(DeleteBehavior.Cascade);
     300
    297301                e.HasOne(p => p.EnrolledSemesters)
    298302                 .WithMany(es => es.Users)
Note: See TracChangeset for help on using the changeset viewer.