Inheritance: BaseDbScriptTemplate
Example #1
0
        public override void Generate()
        {
            //If this is NOT a zero-touch install then there is no embedded SQL
            if (!_model.Database.AllowZeroTouch)
            {
                return;
            }

            foreach (Table table in (from x in _model.Database.Tables where x.Generated orderby x.Name select x))
            {
                if (table.Generated)
                {
                    ZeroInstallSQL_InsertTemplate template = new ZeroInstallSQL_InsertTemplate(_model, table);
                    string fullFileName = template.FileName;
                    ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, PARENT_ITEM_NAME, ProjectItemType.Folder, this, true);
                    eventArgs.Properties.Add("BuildAction", 3);
                    OnProjectItemGenerated(this, eventArgs);
                }
            }
            ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);

            OnGenerationComplete(this, gcEventArgs);
        }
		public override void Generate()
		{
			//If this is NOT a zero-touch install then there is no embedded SQL
			if (!_model.Database.AllowZeroTouch) return;

			foreach (Table table in (from x in _model.Database.Tables where x.Generated orderby x.Name select x))
			{
				if (table.Generated)
				{
					ZeroInstallSQL_InsertTemplate template = new ZeroInstallSQL_InsertTemplate(_model, table);
					string fullFileName = template.FileName;
					ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, PARENT_ITEM_NAME, ProjectItemType.Folder, this, true);
					eventArgs.Properties.Add("BuildAction", 3);
					OnProjectItemGenerated(this, eventArgs);
				}
			}
			ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
			OnGenerationComplete(this, gcEventArgs);
		}