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 214039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:20:10+00:00 2026-05-11T18:20:10+00:00

I am using NHibernate with FluentNHibernate for my DAL. I am also using SchemaExport

  • 0

I am using NHibernate with FluentNHibernate for my DAL. I am also using SchemaExport and SchemaUpdate to create and update my database schema.

My problem is that the schema operations all require the database to exist before they will work. I want to programmatically create my database and update the schema as there may be multiple databases and the creating of the database is not only a once-off operation.

I know I can do this manually by executing a create database command on a connection to the master database, but this feels wrong considering that I otherwise use NHibernate for all my database interactions. As an aside, I use a SQLite inmemory database for my unit tests so any sql I write will then have to know which database I’m using.

Is there any way to get NHibernate to create my database for me?

  • 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-11T18:20:10+00:00Added an answer on May 11, 2026 at 6:20 pm

    Have a look at RhinoCommons. Under Rhino.Commons.ForTesting, in UnitOfWorkTestContextDbStrategy.cs, Ayende has done some routine there that creates databases.

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

Sidebar

Related Questions

Currently I'm using Fluent NHibernate to generate my database schema, but I want the
i'm using oracle with FluentNHibernate automapping with alterations & NHibernate the problem is how
I think this is a moderately neophyte question. I've been using NHibernate/FluentNHibernate for about
I'm using FluentNHibernate but NHibernate XML will do. Say I have this model public
I am using NHibernate/Fluent NHibernate in an ASP.NET MVC app with a MySQL database.
If using Fluent NHibernate, is it possible to automap most classes, but specify that
I'm using Fluent NHibernate auto mapping. I need to access more than one database
In my project I am using NHibernate/FluentNHibernate, and I am working with two entities,
I have a WPF application running with VS2010 .Net3.5 using Nhibernate with FluentNHibernate +
I would like to add a conditional property to an NHibernate entity using FluentNhibernate

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.