The consequence of hiding the NHibernate ISession type from the client code is that I now have to rely on inline SQL which kind of makes me queasy. But this feeling is temporary because I can use a feature of NHibernate called DetachedNameQuery to achieve the following:
IRepository repository = new NHibernateRepository();
IDetachedQuery query = new DetachedNamedQuery("GetMaxTaskId");
ITask task = repository.Find<Task>(query);
GetMaxTaskId is defined in my NHibernate mapping file, Task.hbm.xml.
The entry takes the following form:
<query name ="GetMaxTaskId">
select max(task.Id) from Task task
The great advantage of MVC Code First is the automated code generation tools. We took a test drive of these features by developing a small ...
This little excursion in numerical analysis was prompted by the rather flaky IRR Excel function available in Microsofts' Excel API. We w...
This solution resolved my SQLite connection string configuration. The code makes use of the SQLiteConnectionStringBuilder class. The databas...
After starting out on the XBAP route and quickly hitting the sandbox limit it was time to actually move to an application paradigm that wou...