Inheritance: nHydrate.Generator.EFCodeFirst.EFCodeFirstBaseTemplate
コード例 #1
0
 public override void Generate()
 {
     foreach (Table table in _model.Database.Tables.Where(x => x.Generated && !x.AssociativeTable && (x.TypedTable != TypedTableConstants.EnumOnly) && x.AllowAuditTracking).OrderBy(x => x.Name))
     {
         var template = new AuditEntityExtenderTemplate(_model, table);
         var fullFileName = RELATIVE_OUTPUT_LOCATION + template.FileName;
         var eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, this, false);
         OnProjectItemGenerated(this, eventArgs);
     }
     var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
     OnGenerationComplete(this, gcEventArgs);
 }
コード例 #2
0
        public override void Generate()
        {
            foreach (Table table in _model.Database.Tables.Where(x => x.Generated && !x.AssociativeTable && (x.TypedTable != TypedTableConstants.EnumOnly) && x.AllowAuditTracking).OrderBy(x => x.Name))
            {
                var template     = new AuditEntityExtenderTemplate(_model, table);
                var fullFileName = RELATIVE_OUTPUT_LOCATION + template.FileName;
                var eventArgs    = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, this, false);
                OnProjectItemGenerated(this, eventArgs);
            }
            var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);

            OnGenerationComplete(this, gcEventArgs);
        }