Adam Vincent
Adam Vincent
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
this is why I'm not concerned about losing my job to AI.
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
neither did ChatGPT hehe.
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
but that's IF you have the navigation props in the entity types, which he doesn't.
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
I did, and this is what you need to learn to fix it. You have to define the relationship between TodoEntity and TodoItemEntity https://learn.microsoft.com/en-us/ef/core/modeling/relationships
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
you can paste the code back in chatgpt and tell it to explain it to you
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
🤔
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
shouldnt it be .Entity<TodoItemEntity>.WithMany(TodoItemEntity)?
45 replies
CC#
Created by /Mr.Ares77 on 1/15/2025 in #help
How to update mysql server data?
dbcontext has the relationship between TodoEntity and TodoItemEntity commented out, and that relationship is backwards, no? (it's been a while since I entity framework'd)
// modelBuilder.Entity<TodoItemEntity>()
// .HasOne(ti => ti.Todo)
// .WithMany()
// .HasForeignKey(ti => ti.TodoId)
// .OnDelete(DeleteBehavior.SetNull);
// }
// modelBuilder.Entity<TodoItemEntity>()
// .HasOne(ti => ti.Todo)
// .WithMany()
// .HasForeignKey(ti => ti.TodoId)
// .OnDelete(DeleteBehavior.SetNull);
// }
45 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
been there. Auto-complete will do that to ya.
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
If you have a really good reason why Key is private set you can use PrivateSetterContractResolver(), to deserilize privates
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
If you changed
public string Key { get; private set; }
public string Key { get; private set; }
to
public string key { get; private set; } //lower case property name
public string key { get; private set; } //lower case property name
then you might be looking for CamelCasePropertyNamesContractResolver
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
or you can specify the constructor with the JsonConstructorAttribute
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
yup, serializers like System.Text.Json and JSON.Net are looking for a public parameter-less constructor https://stackoverflow.com/questions/23017716/json-net-how-to-deserialize-without-using-the-default-constructor
42 replies
CC#
Created by antessq on 1/15/2025 in #help
hello
art -> asset stores exist music -> asset stores exist sound -> asset stores exist -> costs $$ marketing -> who cares it's your first game? -> can't play a game if you've never heard of it but don't expect things to be perfect or even good -> doesn't sound like a successful game
54 replies
CC#
Created by antessq on 1/15/2025 in #help
hello
creating a successful game takes the following skills - art - music - sound - programming - marketing - testing - game mechanics - content - ui/ux
54 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
It is fine. But in general, int is the framework default convention. I prefer to stick to convention.
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
right! we read the same thing from different perspectives.
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
also, generally speaking, exceptions are for exceptional circumstances. with your console app example, a user entering a bad option wouldn't generally be considered exceptional.
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
ushort gets expanded to 32bit anyways, and integer math is faster.
50 replies
CC#
Created by 77_105_114_111 on 1/14/2025 in #help
✅ Try catch exception.
just use int
50 replies