I picked up some code from various sources on the internet, below is one of
them:

http://blog.vuscode.com/malovicn/archive/2009/01/03/fluent-nhibernate-nhiber
nate-without-configuration-files-automap-magic.aspx

 

I was under the impression i didn't have to do all the mappings with Fluent
NHibernate? I did first create some mapping classes to map my business
objects but i couldn't get this to work either in the end.

 

Here is a slightly different version of my code, my business objects are
slightly different and inherit a base class, is this still no good?

http://www.ukcreativedesigns.com/NHibernate2.rar

 

Even with the automapping do i have to create the mapping classes? I have
included the mapping classes class library to show you what i had done
previously.

 

I want to use the SQLite database for my testings to improve speed.

 

Thanks for the swift replies!

 

Paul

 

From: [email protected]
[mailto:[email protected]] On Behalf Of James Gregory
Sent: 11 July 2009 07:22
To: [email protected]
Subject: [fluent-nhib] Re: automapping - newbie to nhibernate

 

Where'd you get your code from?

 

Just do this in your SetupContext:

 

var sessionFactory =

  Fluently.Configure()

    .Database(/* your db */)

    .Mappings(/* add your mappings /*)

    .BuildSessionFactory();

On Sat, Jul 11, 2009 at 2:21 AM, Paul <[email protected]> wrote:


Hi everyone!

I am struggling to get to grips with my project and would be extremely
greatful if someone could download my solution and explain to me why
my unit test is failing....it appears as if it's not seeing the
mappings from my business layer.

I have tried for about 8 hours straight to get this to work and i'm
about to give up, asking the experts is my last resort.

You can download the project from here:
http://www.ukcreativedesigns.com/NHibernate.rar

Thank you very much!!

Paul Hinett



 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to