update database for surveylib

This commit is contained in:
Вячеслав 2025-05-26 01:10:01 +05:00
parent c080e09cfb
commit 9b3faed8fc
4 changed files with 386 additions and 0 deletions

View file

@ -24,5 +24,11 @@ public class ApplicationDbContext : SurveyDbContext
.WithMany()
.HasForeignKey(s => s.CreatedBy)
.OnDelete(DeleteBehavior.SetNull);
modelBuilder.Entity<Completion>()
.HasOne<User>()
.WithMany()
.HasForeignKey(c => c.CompletedBy)
.OnDelete(DeleteBehavior.SetNull);
}
}