When you work with ORM like nhibernate, having a tool like nhprof is the key of success. But even with NHProfiler you could not prevent people of doing wrong stuff because they do not use it . I have a simple scenario, a developer changed a method on the server lazily fetching a property of [...]
Continue reading about Unit test NHibernate query to verify N+1
Another advantage of storing properties of entities into a state object based on a Dictionary, is the ability to easily serialize objects in custom formats. As an example I create an XML serializer that is capable to serialize an entity in a custom XML format. I used this simple serializer to create a NHibernate User [...]
I’ve applications that can work in two distinct configuration, they are based on WPF and MVVM, where the VM communicates with the Domain / Business Logic through services like IXxxxService. All View Models depends from one or more services and thanks to Castle I can decide with configuration file which concrete class to use for [...]
Continue reading about Managing remote logging with Log4net and WCF
1: DateAdd(dd, T.AnalysisFrequence, :refdate) Quite often I use SQLite to create Unit Tests of NH queries with a fast In-Memory database, and then run the queries against a standard Sql Server database. Today I have this problem, an HQL query uses the DateAdd Sql Server function 1: DateDiff(dd, T.AnalysisFrequence, :refdate) In this query with the [...]
Continue reading about Use SQLite to test NH–DateAdd function
Some time ago I blogged about a technique to use SqLite in Unit testing when you have nhibernate mapping that targets Sql Server tables in a schema different from dbo. The problem was: if you specify the schema name in the mapping of a class, then you are not able to execute the test in [...]
Continue reading about Using schema with NHibernate and SqlLite





