fluent

How to get all object (in relation) while saving in Fluent nHibernate .net mvc application

I have pasted all the code below. The problem is when I try to save or update Town Entity, County Title comes null and Model State becomes false. Could you suggest me a way to get complete county Object here while saving Town. Could you also suggest me better flent nHibernate mapping in this case, please? I have following classes and m...

MySQL Configuration for Fluent NHibernate

Hi all! I have class-configurer fluent nhibernate for MySQL: class MySqlInitializer : INHibernateInitializer { public Configuration GetConfiguration() { var dbServer = "localhost"; var dbUsername = "root"; var dbName = "nhibernate"; var dbPassword = ""; var ormAssembly = "NHibernate_MySQL....

I get an error in my first (fluent) nhibernate query Initializing[type]-failed... no session or session was closed

I just started with NHibernate, created my mappings using fluent NHibernate as follows: public class CustomerMap : ClassMap<Customer> { public CustomerMap() { Id(x => x._id, "Id"); Map(x => x._KdNr, "KdNr"); Map(x => x._Name, "Name"); HasMany(x => x._Contact) .Table("Contacts") ...