Friday, April 09, 2010

Can't write to a readonly object Source: NHibernate

This happens when you try to flush the default session with ReadOnlyCache objects. So in your ReadOnlyCached entity repository methods use:
using (new SessionScope(FlushAction.Never))
{
    entityRepository.FindAll();
}

No comments:

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...