Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fluent NHibernate-mappings-Add from Namespace
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rema  
View profile  
 More options Oct 31 2012, 2:54 pm
From: rema <rema4...@yahoo.com>
Date: Wed, 31 Oct 2012 11:54:06 -0700 (PDT)
Local: Wed, Oct 31 2012 2:54 pm
Subject: Fluent NHibernate-mappings-Add from Namespace

I am working on a project with multiple databases. I want to have all my
entities and mappings in the same assembly (to reduce assembly load time).
So I have
Project
 - Database1
 -- Entities      
 -- Mapping
 -- Repositories

 - Database2
 -- Entities
 -- Mapping
 -- Repositories

And when creating session factories use like this:

When session factory for Database1 is needed use: only the
.Mappings(x=>x.FluentMappings (add from namespace Project1.Database1)

When session factory for Database2 is needed use: only the
.Mappings(x=>x.FluentMappings (add from namespace Project1.Database2)

This way the mappings loaded are only as needed (thereby reducing the
mappings load time).

I know that I can use AutoMapping and use namespace but I do not want to
use AutoMapping. I have to use FluentMapping.

I know that I can put different databases in different assemblies and then
use AddFromAssemblyOf but that will increase the number of assemblies and I
will prefer not to do that.

Is there any way to do that while in the same project?

Any ideas? Any code samples?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »