I'm looking at implementing an n-tier solution with NHibernate, and have read a bit about remoting NH-mapped objects over the wire (and the difficulties involved), but I want to do things a little differently.
Rather than serializing entire objects, I want to expose the data in basically raw form on one tier, and keep all the NH mapping/hydration/persistence code on another tier. For "security" (read: "political") reasons, the SQL server cannot be exposed directly. WCF (for instance) as a channel would be acceptable though.
Is this clear? If so, what might be a suggested way to do this? My first thought would be to write a custom IClassPersister...but I'm too new to NH to know if this is advisable.
Any thoughts?
Thanks in advance.
|