Created
December 5, 2010 18:36
-
-
Save Itslet/729331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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