Hi,
how exactly I can use public methods (non-virtual) with NHibernate?
I have this code:
public string crewNumber
{
get
{
return this.crewNumberField;
}
set
{
this.crewNumberField = value;
}
}
Note all my classes, properties, methods and interfaces are auto-generated and I do not want to change them manually.
Above code is producing this error:
The following types may not be used as proxies: ... method get_crewNumber should be 'public/protected virtual'
I see that it shold be possible to use simple public only properties here:
In our example above, we've made the properties and the constructor public - but that's not a requirement for NHibernate - it can use public, protected, internal, or even private properties to persist your data.
How do I turn off this virtual by default?
It's driving me crazy. I am really tempted here to drag one data adapter in visual studio and to end this ridiculous situation once and for all ;-)
Thanks