Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using fluent nhibernate, is there anyway to have a private property mapped

Tags:

c#

nhibernate

i have a field that i want to map as it links to a column in the database but i don't want any external class to access this field directly from my code (its only used in private calculations).

is this possible to have a field that i can map but it private using fluent nhibernate??

like image 740
leora Avatar asked Dec 07 '25 04:12

leora


1 Answers

Yes it is possible. You can use the Reveal.Member static methods to map a private or hidden property

Map(Reveal.Member<string>("privateProperty"))
like image 200
Vadim Avatar answered Dec 08 '25 18:12

Vadim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!