I have a C# .NET 3.5 data access layer that is a plain ADO.NET implementation. I’m looking to replace my sub-standard homegrown Object Relation Map classes with something more robust such as fluent-nhibernate.
I’m trying to figure out if I can use the majority of my existing ADO.NET implementation with fluent nhibernate class maps. Is it possible to use FluentNHibername.Mapping.ClassMap maps to map System.Data.IDataRecords returned from my Database to my POCOs and to map POCOs to IDbCommand Update/Insert commands? Is this recommended, or am I better off using FluentNHibernate “all the way”? I’ve only seen tutorials using FluentNHibernate for the entirety of the database access model.
Fluent NHibernateis only a mapping layer forNHibernate. It is basically a fancy fluent style syntax to generate xml files thatNHibernatereads/loads.The only thing I would think you could reuse is your POCOs. You would basically map your POCOs to the database using
Fluent NHibernate.NHibernatewould then deal with all theCRUD.