mg
mg
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
Also don't use AddAsync()
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
Though it's impossible for it to be null, so I'm honestly not sure what's going on
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
See what the value of TasksID is
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
Put a breakpoint in and examine the properties of tasksModel
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
It's also worth noting that your dbcontext is itself a repository, and you don't need to layer another one on top of it
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
so what's happening at TasksRepository.cs:line 28
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
It's really weird that it's being thrown, because the property is a non nullable value type, so EF shouldn't be sending a query that tries to insert null into that column
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
To start all we need is the stack trace of that exception to see what caused it
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
e.g. Project instead of Projects
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
Also, you should name your classes in the singular form
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
What insert statement is causing the error?
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
It looks like it's the primary key of the Tasks table, which should indeed not be nullable
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
namely TasksID
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
The error indicates you're trying to insert null into a non-nullable column
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
It's the same way you do a single one to many relationship, you just do it multiple times
36 replies
CC#
Created by ZerkyXII on 7/3/2024 in #help
Multiple 1 to Many Relationships in Entity Framework
So a project has many tasks, and many users, and many clients, etc?
36 replies
CC#
Created by Moneylover3246 on 6/18/2024 in #help
Making 2d world generation deterministic
yeah, i've never dabbled in any kind of procedural generation so i can't offer much help in that regard
22 replies
CC#
Created by Moneylover3246 on 6/18/2024 in #help
Making 2d world generation deterministic
for scaling i'm not sure. i don't do game dev and i'd probably need more details on how your generator works and why it doesn't scale as-is
22 replies
CC#
Created by Moneylover3246 on 6/18/2024 in #help
Making 2d world generation deterministic
well as far as being reproducible with the same seed goes, you just have to pass that seed to whatever random number generator you're using. in the case of System.Random that just means creating a new Random(seed)
22 replies
CC#
Created by Moneylover3246 on 6/18/2024 in #help
Making 2d world generation deterministic
so is the issue with the generation being deterministic or with it not scaling past a certain finite size?
22 replies