XmlSchema generateSchema(string entityTypeId) { StandardSchema generator = new StandardSchema(context.ExtensionManager); EntityType entityType = context.ExtensionManager.ModelService.GetEntityType(entityTypeId); return(generator.GenerateSchemaFromEntity(entityType, LoadLevel.DataAndLinks)); }
public XmlSchema GenerateSchemaForEntityType(string entityTypeId) { lock (this.schemaRegeneratLock) { const LoadLevel LoadLevel = LoadLevel.DataAndLinks; EntityType entityType = this.manager.ModelService.GetEntityType(entityTypeId); var standardSchema = new StandardSchema(this.manager); XmlSchema schema = standardSchema.GenerateSchemaFromEntity(entityType, LoadLevel); return(schema); } }