Jiry_XD
Jiry_XD
Explore posts from servers
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Thanks 😋
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
I'll put that to good use 😛
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Oh I see thanks for the tip 🙂
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
True, thats why I wanted to omit it
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Thanks 😛
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Great thanks, that's what I was wondering if it worked
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Gotcha, so you only hold TeamPlayers in the image's case?
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
No description
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Do you need both or is one fine?
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
Gotcha thanks! One more question however: As you can see in my machine class I have only a List of OptionMachine But not a list of Option. Online I always saw that they add both the explicit Junction/Join entity and the entity itself?: https://learn.microsoft.com/en-us/ef/core/modeling/relationships/many-to-many#many-to-many-and-join-table-with-payload https://stackoverflow.com/questions/78766403/net-ef-core-how-to-correctly-insert-and-update-a-model-in-a-many-to-many-rela For example in above Post, they hold both a list of Tag and a list of PostTag
26 replies
CC#
Created by Jiry_XD on 11/21/2024 in #help
✅ Seeding question
I know I can probably add them later, outside of the initialization but I'd like to enforce that a machine needs to exist WITH options WITH a price.
26 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
Gotcha thanks 😉
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
Maybe one last thing I'd like to ask: If you look at OP's Question: https://stackoverflow.com/questions/78766403/net-ef-core-how-to-correctly-insert-and-update-a-model-in-a-many-to-many-rela You can see he holds both the junction and other entity Player:
public ICollection<Team> Teams { get; set; } = [];
public ICollection<TeamPlayer> TeamPlayers { get; set; } = [];
public ICollection<Team> Teams { get; set; } = [];
public ICollection<TeamPlayer> TeamPlayers { get; set; } = [];
Team:
public ICollection<Player> Players { get; set; } = [];
public ICollection<TeamPlayer> TeamPlayers { get; set; } = [];
public ICollection<Player> Players { get; set; } = [];
public ICollection<TeamPlayer> TeamPlayers { get; set; } = [];
In my case: I only want them with the price, is it okay to leave out List<Option> And just use the junction List<OptionMachine>? Or would that mean I have to use entityconfiguration?
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
Thanks for the help 😉
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
Doesn't matter haha it's right don't worry 😅
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
A machine can have many options an option can be linked to many machines
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
X => Machine Y => Option
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
Its a many to many, X can have many Y and Y can have many X
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
I think the link will help me further
34 replies
CC#
Created by Jiry_XD on 11/20/2024 in #help
✅ EF Core Junction Tables with seperate columns
But thanks
34 replies