What's the best approach for readonly property
Posted
by Patrick Parent
on Stack Overflow
See other posts from Stack Overflow
or by Patrick Parent
Published on 2010-03-12T19:39:48Z
Indexed on
2010/03/12
19:47 UTC
Read the original article
Hit count: 201
Hi,
I'm using a model UserRepository->User
The Repository is used to Save and Load the User.
I want to be able to set the ID in the Repository, but I don't want it to be access by UI.
The User and Repository are found in a Core project, and the UI in a Web.
Is there a way to do this, like a modifier for the property, or should I put the ID in the User contructor ?
Thanks
© Stack Overflow or respective owner