Skip to content

Instantly share code, notes, and snippets.

@Itslet
Created December 5, 2010 18:36
Show Gist options
  • Save Itslet/729331 to your computer and use it in GitHub Desktop.
Save Itslet/729331 to your computer and use it in GitHub Desktop.
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using Concepts.Core;
namespace Concepts.Tasks
{
class Program
{
public static void createDatabase()
{
var nhconfig = new Configuration().Configure();
var sessionFactory = nhconfig.BuildSessionFactory();
var schemaExport = new SchemaExport(nhconfig);
schemaExport.SetOutputFile(@"concepts.sql")
.Execute(true, true, false);
Console.WriteLine("I created your database");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment