abstract private DispatchToModelGenerationExtensions ( ) : void | ||
리턴 | void |
// internal virtual to allow mocking protected override void ProcessModel(DbModel model, string storeModelNamespace, ModelBuilderSettings settings, ModelBuilderEngineHostContext hostContext, List <EdmSchemaError> errors) { Edmx = XDocument.Parse(_initialModelContentsFactory.GetInitialModelContents(settings.TargetSchemaVersion)); var edmxHelper = new EdmxHelper(Edmx); edmxHelper.UpdateEdmxFromModel(model, storeModelNamespace, settings.ModelNamespace, errors); // load extensions that want to update model after the wizard has run. hostContext.DispatchToModelGenerationExtensions(); UpdateDesignerInfo(edmxHelper, settings); }
// internal virtual to allow mocking protected override void ProcessModel(DbModel model, string storeModelNamespace, ModelBuilderSettings settings, ModelBuilderEngineHostContext hostContext, List<EdmSchemaError> errors) { Edmx = XDocument.Parse(_initialModelContentsFactory.GetInitialModelContents(settings.TargetSchemaVersion)); var edmxHelper = new EdmxHelper(Edmx); edmxHelper.UpdateEdmxFromModel(model, storeModelNamespace, settings.ModelNamespace, errors); // load extensions that want to update model after the wizard has run. hostContext.DispatchToModelGenerationExtensions(); UpdateDesignerInfo(edmxHelper, settings); }
internal virtual void GenerateModel(EdmxHelper edmxHelper, ModelBuilderSettings settings, ModelBuilderEngineHostContext hostContext) { var generatingModelWatch = Stopwatch.StartNew(); // Clear out the ModelGenErrorCache before ModelGen begins PackageManager.Package.ModelGenErrorCache.RemoveErrors(settings.ModelPath); var errors = new List <EdmSchemaError>(); try { var storeModelNamespace = GetStoreNamespace(settings); var model = GenerateModels(storeModelNamespace, settings, errors); edmxHelper.UpdateEdmxFromModel(model, storeModelNamespace, settings.ModelNamespace, errors); // load extensions that want to update model after the wizard has run. hostContext.DispatchToModelGenerationExtensions(); UpdateDesignerInfo(edmxHelper, settings); hostContext.LogMessage( FormatMessage( errors.Any() ? Resources.Engine_ModelGenErrors : Resources.Engine_ModelGenSuccess, Path.GetFileName(settings.ModelPath))); if (errors.Any()) { PackageManager.Package.ModelGenErrorCache.AddErrors(settings.ModelPath, errors); } } catch (Exception e) { hostContext.LogMessage(FormatMessage(Resources.Engine_ModelGenException, e)); } generatingModelWatch.Stop(); hostContext.LogMessage(FormatMessage(Resources.LoadingDBMetadataTimeMsg, settings.LoadingDBMetatdataTime)); hostContext.LogMessage(FormatMessage(Resources.GeneratingModelTimeMsg, generatingModelWatch.Elapsed)); }