Kuurama
Kuurama
CC#
Created by Kuurama on 12/14/2023 in #help
EFCore 8 - Owned type with navigation property not being included
I just went Score.HitTracker, Score.AccuracyTracker, instead of wrapping them. Because i felt like this couldn't be helped without changing the onModelCreated, which i don't wznt to do. If you guys had an explaination i would still be up to understand it..
3 replies
CC#
Created by Kuurama on 12/14/2023 in #help
EFCore 8 - Owned type with navigation property not being included
THe navigation might be wrong, but it's auto generated so i don't know, i do the classes first:
modelBuilder.Entity("Server.Database.Models.Score", b =>
{
b.HasOne("Server.Database.Models.Player", "Player")
.WithMany("Scores")
.HasForeignKey("PlayerID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();

b.HasOne("Server.Database.Models.SongDifficulty", "SongDifficulty")
.WithMany()
.HasForeignKey("SongDifficultyID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();

b.OwnsOne("Server.Database.Models.Trackers", "Trackers", b1 =>
{
b1.Property<uint>("ScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("AccuracyTrackerScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("GraphTrackerScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("HitTrackerScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("WinTrackerScoreID")
.HasColumnType("int unsigned");

b1.HasKey("ScoreID");

b1.HasIndex("AccuracyTrackerScoreID");

b1.HasIndex("GraphTrackerScoreID");

b1.HasIndex("HitTrackerScoreID");

b1.HasIndex("WinTrackerScoreID");

b1.ToTable("Scores");

b1.HasOne("Server.Database.Models.AccuracyTracker", "AccuracyTracker")
.WithMany()
.HasForeignKey("AccuracyTrackerScoreID");

b1.HasOne("Server.Database.Models.ScoreGraphTracker", "GraphTracker")
.WithMany()
.HasForeignKey("GraphTrackerScoreID");

b1.HasOne("Server.Database.Models.HitTracker", "HitTracker")
.WithMany()
.HasForeignKey("HitTrackerScoreID");

b1.WithOwner()
.HasForeignKey("ScoreID");

b1.HasOne("Server.Database.Models.WinTracker", "WinTracker")
.WithMany()
.HasForeignKey("WinTrackerScoreID");

b1.Navigation("AccuracyTracker");

b1.Navigation("GraphTracker");

b1.Navigation("HitTracker");

b1.Navigation("WinTracker");
});

b.Navigation("Player");

b.Navigation("SongDifficulty");

b.Navigation("Trackers")
.IsRequired();
});
modelBuilder.Entity("Server.Database.Models.Score", b =>
{
b.HasOne("Server.Database.Models.Player", "Player")
.WithMany("Scores")
.HasForeignKey("PlayerID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();

b.HasOne("Server.Database.Models.SongDifficulty", "SongDifficulty")
.WithMany()
.HasForeignKey("SongDifficultyID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();

b.OwnsOne("Server.Database.Models.Trackers", "Trackers", b1 =>
{
b1.Property<uint>("ScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("AccuracyTrackerScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("GraphTrackerScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("HitTrackerScoreID")
.HasColumnType("int unsigned");

b1.Property<uint?>("WinTrackerScoreID")
.HasColumnType("int unsigned");

b1.HasKey("ScoreID");

b1.HasIndex("AccuracyTrackerScoreID");

b1.HasIndex("GraphTrackerScoreID");

b1.HasIndex("HitTrackerScoreID");

b1.HasIndex("WinTrackerScoreID");

b1.ToTable("Scores");

b1.HasOne("Server.Database.Models.AccuracyTracker", "AccuracyTracker")
.WithMany()
.HasForeignKey("AccuracyTrackerScoreID");

b1.HasOne("Server.Database.Models.ScoreGraphTracker", "GraphTracker")
.WithMany()
.HasForeignKey("GraphTrackerScoreID");

b1.HasOne("Server.Database.Models.HitTracker", "HitTracker")
.WithMany()
.HasForeignKey("HitTrackerScoreID");

b1.WithOwner()
.HasForeignKey("ScoreID");

b1.HasOne("Server.Database.Models.WinTracker", "WinTracker")
.WithMany()
.HasForeignKey("WinTrackerScoreID");

b1.Navigation("AccuracyTracker");

b1.Navigation("GraphTracker");

b1.Navigation("HitTracker");

b1.Navigation("WinTracker");
});

b.Navigation("Player");

b.Navigation("SongDifficulty");

b.Navigation("Trackers")
.IsRequired();
});
3 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
I've never programmed in french, it's something that took some getting used to but it's worth the effort.
38 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
KEK
38 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
I haven't asked for english comments
38 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
Clearly, but since they can already ask for help in english here, i don't expect 3 variable name to be a limiting factor
38 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
And i bet the best programmers in your class barely write their code in german, it' pretty much always the one writting up full english straight up for some reason 🤣
38 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
I see, you will get to it eventually. But it's even better that the code is in english for entreprises or for online help <:KuuramaNICE_Edit:862500207395602442>
38 replies
CC#
Created by j7nooah on 11/15/2023 in #help
I am new to c# and need help
A bit off topic but aren't english naming the norm? Rather than country specific language? Doing non english naming in programming school shouldn't be allowed (if i was a teacher). It's not a good habit to take i guess.
38 replies