adding asp.net constaint on the class object field
in asp.net efcore :
how can i force that User.role == "Medecin" in the Consultation class when inserting
2 Replies
those first 2 attributes are the default
wdym by force? it can only be that?
i will make it so only "Medecin" can create a consultation,
so i want to add validation that when you create a consultation then the User.role must be "Medecin"
(of corse i will do permissions for routes, but thats application level validation)
.