protected override void Seed(SimpleDbContext context)
        {
            var commands = SqlCommandProvider.GetCommands("create_init_data.sql");

            if (commands != null && commands.Length > 0)
            {
                foreach (var command in commands)
                {
                    context.Database.ExecuteSqlCommand(command);
                }
            }
        }
Beispiel #2
0
        public DbCommand GetSqlTextCommand(String sql, object[] inputs)
        {
            var commandProvider = new SqlCommandProvider(this, sql, inputs);

            return(commandProvider.GetDbCommand());
        }