This can be done easily by looking for the System.ComponentModel.Description attribute on entities and properties, and using the EDM model's SetDocumentation() method.
Comments: ``` private static IEdmModel GetEdmModel() { ODataConventionModelBuilder builder = new ODataConventionModelBuilder(); builder.EntitySet<Customer>("Customers"); builder.EntitySet<Order>("Orders"); IEdmModel model = builder.GetEdmModel(); DocumentModel(model); return model; } private static void DocumentModel(IEdmModel model) { foreach (IEdmType edmType in model.SchemaElements.OfType<IEdmType>()) { Type clrType = model.GetAnnotationValue<ClrTypeAnnotation>(edmType).ClrType; model.SetDocumentation(edmType, new EdmDocumentation("Summary", "Description")); } } ```
Comments: ``` private static IEdmModel GetEdmModel() { ODataConventionModelBuilder builder = new ODataConventionModelBuilder(); builder.EntitySet<Customer>("Customers"); builder.EntitySet<Order>("Orders"); IEdmModel model = builder.GetEdmModel(); DocumentModel(model); return model; } private static void DocumentModel(IEdmModel model) { foreach (IEdmType edmType in model.SchemaElements.OfType<IEdmType>()) { Type clrType = model.GetAnnotationValue<ClrTypeAnnotation>(edmType).ClrType; model.SetDocumentation(edmType, new EdmDocumentation("Summary", "Description")); } } ```