Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to map a class as immutable using FluentNHibernate?

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" >
like image 363
Amitabh Avatar asked Jan 15 '13 12:01

Amitabh


1 Answers

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

summary:

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

        // Mappings
    }
}
like image 88
Radim Köhler Avatar answered Nov 05 '22 12:11

Radim Köhler