コード例 #1
0
 public override void Generate()
 {
     try
     {
         foreach (CustomStoredProcedure storedProcedure in _model.Database.CustomStoredProcedures.OrderBy(x => x.Name))
         {
             if (storedProcedure.Generated)
             {
                 DomainStoredProcedureGeneratedTemplate template = new DomainStoredProcedureGeneratedTemplate(_model, storedProcedure);
                 string fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
                 ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
                 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)
          {
            DomainStoredProcedureGeneratedTemplate template = new DomainStoredProcedureGeneratedTemplate(_model, storedProcedure);
            string fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
            ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
            OnProjectItemGenerated(this, eventArgs);
          }
        }
        ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
        OnGenerationComplete(this, gcEventArgs);
      }
      catch(Exception ex)
      {
        throw;
      }
    }