Mapping a read-only property with no setter using Fluent NHibernate
问题 I have a domain class that looks like this. I want NHibernate to save the current value of LastUpdate when inserting/updating so that I can use it in queries, but to ignore it when retrieving a Foo from the database and let the object itself recalculate the value when I actually access it. public class Foo { public DateTime LastUpdate { get { /* Complex logic to determine last update by inspecting History */ return value; } } public IEnumerable<History> History { get; set; } /* etc. */ } My