9

How can I map a class as immutable using FluentNHibernate. Using hbm I can do like this.

<class name="Namespace.YYYY" table="XXXX" mutable="false" >
Amitabh
  • 59,111
  • 42
  • 110
  • 159
  • Possible duplicate of [Fluent NHibernate: How to map an entire class as ReadOnly?](https://stackoverflow.com/questions/2871251/fluent-nhibernate-how-to-map-an-entire-class-as-readonly) – Frédéric Jun 15 '17 at 13:52

1 Answers1

9

Try this link: https://stackoverflow.com/a/2871277/1679310

summary:

class EntityMap : ClassMap<Entity>
{
    public EntityMap()
    {
        ReadOnly();

        // Mappings
    }
}
Community
  • 1
  • 1
Radim Köhler
  • 122,561
  • 47
  • 239
  • 335