public SchemaInfo GeneratePartialMapping(FileNameHelper helper, ContextClassInfo info) { var schemaInfo = SchemaInfo.Create(Controller.SiteRow); schemaInfo.IsPartial = true; if (!string.IsNullOrEmpty(info.NamespaceName)) { schemaInfo.NamespaceName = info.NamespaceName; } schemaInfo.ClassName = info.ClassName; var contentView = new DataView(Controller.ContentsTable) { RowFilter = $"add_context_class_name = '{info.FullClassName}'" }; var contentToContentView = new DataView(Controller.ContentToContentTable) { RowFilter = "map_as_class = 1" }; var doc = CreateMapping(true, schemaInfo, contentView, contentToContentView, helper); if (InMemory) { ResolveMapping(doc); } else { ResolveMapping(helper.UsableMappingXmlFileName, helper.MappingResultXmlFileName); } return(schemaInfo); }
public SchemaInfo GenerateMainMapping(FileNameHelper helper) { var info = SchemaInfo.Create(Controller.SiteRow); var contentView = new DataView(Controller.ContentsTable); var contentToContentView = new DataView(Controller.ContentToContentTable); var doc = CreateMapping(false, info, contentView, contentToContentView, helper); if (Controller.ProceedMappingWithDb) { contentView.RowFilter = "map_as_class = 1"; contentToContentView.RowFilter = "map_as_class = 1"; doc = CreateMapping(true, info, contentView, contentToContentView, helper); } if (InMemory) { ResolveMapping(doc); } else { ResolveMapping(helper.UsableMappingXmlFileName, helper.MappingResultXmlFileName); } return(info); }