Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4240882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:13:38+00:00 2026-05-21T03:13:38+00:00

hii i am having a little problem in mapping all the entities in contained

  • 0

hii i am having a little problem in mapping all the entities in contained in the namespace “nhibernateTest.Domain” . it basically contains all the Map Classes like , StudentMap, DepartmentMap etc. .. now in case of normal nhibernate what we used to do is :

 private ISessionFactory _sessionFactory;
    private Configuration _configuration;

    [TestFixtureSetUp]
    public void TestFixtureSetUp()
    {

        _configuration = new Configuration().Configure().AddAssembly("nHibernateTest");      
        _sessionFactory = _configuration.BuildSessionFactory();
    }

now what it used to do is . look for all the “*.hbm.xml” files in my namespace and automatically map them…

can someone tell me how to do the same for fluent nHibernate ? so that it looks for all map classes and automatically map them so that i dont have to create the session separately for diffrent Map classes ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:13:39+00:00Added an answer on May 21, 2026 at 3:13 am

    You would need to specify your mappings when configuring Fluent NHibernate in your application. This is typically done by

    Fluently.Configure()
      .Database(/* your database settings */)
      .Mappings(m => m.FluentMappings.AddFromAssemblyOf<StudentMap>())
      .ExposeConfiguration(/* alter Configuration */) // optional
      .BuildSessionFactory();
    

    The code above is from this excellent link which talks about how to configure Fluent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I'm a newbie on grails, im having a little problem now, i created
Hi I'm having some problem with a PHP page: I'm writing a little CMS
Hii, I need to develop an online quiz website that would be having MCQs.
Hi I'm having a weird problem. My app is based on the samplecode of
Hi I am having some issues wrapping some ZMQ pull clients in Python classes.
Hi I'm having problem refreshing my listview after Async operation. I have a simplecursoradapter,
Hi I am having problems with some css classes in joomla. I have two
Hi I am having no problem writing to or appending to a file, the
Hi I am having a problem when trying to update a table using an
Hi i am having a little trouble with my jquery tabs, for some reason

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.