I have a very simple entity with just an id and a description. When i try to do a criteria.List<MyEntity>() and then loop through that list to transform it to a DTO object, it takes a considerably long time compared to entity framework or using a datareader. Looping through the Nhibernate list takes about 8 seconds for just 2000+ records unlike for entity framework its instantaneous.
I've tried settings flushmode to never, clearing out the session but it doesn't affect the performance. Can anybody here shed some light as to why this is happening?
|