This is the code repository for NHibernate 4.x Cookbook, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
This book will take you from the absolute basics of NHibernate through to its most advanced features, showing you how to take full advantage of each concept to quickly create amazing database applications. You will learn several techniques for each of the four core NHibernate tasks—configuration, mapping, session and transaction management, and querying—and which techniques fit best with various types of applications. In short, you will be able to build an application using NHibernate by the end of the book.
All of the code is organized into folders. The commands and instructions will look like the following:
using System.IO;
using log4net;
namespace MyApp.Project.SomeNamespace
{
public class Foo
{
private static ILog log = LogManag-er.GetLogger(typeof(Foo));
public string DoSomething()
{
log.Debug("We're doing something.");
try
{
return File.ReadAllText("cheese.txt");
}
catch (FileNotFoundException)
{
log.Error("Somebody moved my cheese.txt");
throw;
}
}
}
}
Click here if you have any feedback or suggestions.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.