Help! records & Ef
Hello guys ๐ im trying to use a record for a value object owned by my enetity but when updating i get exceptions, below the screens of my code
15 Replies
Yeah, records don't really work with EF
Their properties don't have setters, only initializers
Unknown Userโข9mo ago
Message Not Public
Sign In & Join Server To View
You indeed can make record mutable by overwriting with
{ get; set; }
, however @TeBeCo , can you explain what does request
keyword does?Unknown Userโข9mo ago
Message Not Public
Sign In & Join Server To View
Oh. I got scared in the moment, scraping web to see what it does, thinking it is some new feature in preview ๐
non-nullable > non-default ๐
Unknown Userโข9mo ago
Message Not Public
Sign In & Join Server To View
This is valid
Unknown Userโข9mo ago
Message Not Public
Sign In & Join Server To View
Oh understandable
I thought you were thalking about
required
making it non-nullable
. Thanks.Unknown Userโข9mo ago
Message Not Public
Sign In & Join Server To View
hi thx for the answer @TeBeCo, i still have the same problem even changing adress into a class, maybe im doing something wrong with the executedupdate setters?
if i do it this way it works but damn, this seems a little to verbose no?
Unknown Userโข9mo ago
Message Not Public
Sign In & Join Server To View