Speeding Up NHibernate Startup Time
- by Ricardo Peres
One technique I use and posted on the NHUsers mailing list consists in serializing a previously-configured Configuration to the filesystem and deserializing it on all subsequente starts of the application:
Configuration cfg = null;
IFormatter serializer = new BinaryFormatter();
//first time
cfg = new Configuration().Configure();
using (Stream…