public void Create()
 {
     IStatementBuilder<CreateDatabaseStatement> statementBuilder = new CreateDatabaseStatementBuilder(model.StoreModel);
     IStatement statement = statementBuilder.BuildStatement();
     string sql = statement.CreateStatement();
     db.ExecuteSqlCommand(sql);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Generates the SQL statement, based on the <see cref="EdmModel"/>.
        /// </summary>
        public string Generate(EdmModel storeModel)
        {
            IStatementBuilder <CreateDatabaseStatement> statementBuilder = new CreateDatabaseStatementBuilder(storeModel);
            IStatement statement = statementBuilder.BuildStatement();

            return(statement.CreateStatement());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates the SQLite-Database.
        /// </summary>
        public void Create()
        {
            IStatementBuilder <CreateDatabaseStatement> statementBuilder = new CreateDatabaseStatementBuilder(model.StoreModel);
            IStatement statement = statementBuilder.BuildStatement();
            string     sql       = statement.CreateStatement();

            db.ExecuteSqlCommand(sql);
        }
        private string GetCreateDatabaseCommands()
        {
            var databaseBuilder = new CreateDatabaseStatementBuilder(_dbContext.Instance.Model);

            return(databaseBuilder.BuildStatement().GetText());
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Generates the SQL statement, based on the <see cref="EdmModel"/>.
 /// </summary>
 public string Generate(EdmModel storeModel)
 {
     IStatementBuilder<CreateDatabaseStatement> statementBuilder = new CreateDatabaseStatementBuilder(storeModel);
     IStatement statement = statementBuilder.BuildStatement();
     return statement.CreateStatement();
 }