コード例 #1
0
 public override void Generate()
 {
     try
     {
         foreach (CustomStoredProcedure storedProcedure in _model.Database.CustomStoredProcedures.OrderBy(x => x.Name))
         {
             if (storedProcedure.Generated)
             {
                 BusinessStoredProcedureExtenderTemplate template = new BusinessStoredProcedureExtenderTemplate(_model, storedProcedure);
                 string fullFileName = RELATIVE_OUTPUT_LOCATION + template.FileName;
                 ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, this, false);
                 OnProjectItemGenerated(this, eventArgs);
             }
         }
         ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
         OnGenerationComplete(this, gcEventArgs);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
コード例 #2
0
    public override void Generate()
		{
      try
      {
				foreach (CustomStoredProcedure storedProcedure in _model.Database.CustomStoredProcedures.OrderBy(x => x.Name))
        {
          if(storedProcedure.Generated)
          {

            BusinessStoredProcedureExtenderTemplate template = new BusinessStoredProcedureExtenderTemplate(_model, storedProcedure);
            string fullFileName = RELATIVE_OUTPUT_LOCATION + template.FileName;
            ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, this, false);
            OnProjectItemGenerated(this, eventArgs);
          }
        }
        ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
        OnGenerationComplete(this, gcEventArgs);
      }
      catch(Exception ex)
      {
        throw;
      }
    }