Inheritance: nHydrate.Generator.EFCodeFirst.EFCodeFirstBaseTemplate
 public override void Generate()
 {
     foreach (var customView in _model.Database.CustomViews.Where(x => x.Generated).OrderBy(x => x.Name))
     {
         var template = new ViewEntityGeneratedTemplate(_model, customView);
         var fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
         var eventArgs = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
         OnProjectItemGenerated(this, eventArgs);
     }
     var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
     OnGenerationComplete(this, gcEventArgs);
 }
Example #2
0
        public override void Generate()
        {
            foreach (var customView in _model.Database.CustomViews.Where(x => x.Generated).OrderBy(x => x.Name))
            {
                var template       = new ViewEntityGeneratedTemplate(_model, customView);
                var fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
                var eventArgs      = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
                OnProjectItemGenerated(this, eventArgs);
            }
            var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);

            OnGenerationComplete(this, gcEventArgs);
        }