C
C#9mo ago
ZML

EF parameterless constructor

I have a quick question: Is it a good practice to use a parameterless constructor that will be utilized by Entity Framework?
8 Replies
jcotton42
jcotton429mo ago
I don’t have any constructors on my models, they’re just property bags.
Angius
Angius9mo ago
Same, just properties required if need be
Keswiik
Keswiik9mo ago
likewise
Jimmacle
Jimmacle9mo ago
same
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
ZML
ZMLOP9mo ago
Okay, thanks for your help. For now, I have added parameterless constructors to my classes so that other constructors are not called unnecessarily.
Angius
Angius9mo ago
"I don't have any constructors", "yeah, just properties", "same", "I have no constructors either", "yeah, they're unnecessary"
"Okay, got it, I'll add a parameterless constructor alongside all the other constructors I have" :KEKW:
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?