Fluent NHibernate

NHibernate is popular in Open-source community, fully featured, mature ORM but the way to config mappings in XML files (.hbm.xml files) is not comfort.

I would prefer to write mappings in strongly typed C# code and enjoy from easy refactoring, improved readability and more concise code.


Fluent NHibernate resolves this issue and provides alternative to NHibernate's standard XML mapping files - fluent, XML-less, compile safe.


Samples of mappings:

public class CustomerMap : ClassMap<Customer>
    public CustomerMap()
        Id(x => x.Id, "CustomerId");
        Map(x => x.Firstname);
        Map(x => x.Lastname);
        Map(x => x.Email, "EmailAddress");
    .ConnectionString(c => c
    .Cache(c => c
  .Mappings(m => m


Fluent NHibernate also has several other tools, including:

· Auto mappings - where mappings are inferred from the design of your entities

· Persistence specification testing - round-trip testing for your entities, without ever having to write a line of CRUD

· Full application configuration with Fluent configuration API

· Database configuration - fluently configure your database in code


Project official site







Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com