public static void Dump(this EdmModel edmModel, EdmModelType modelType) { var stringBuilder = new StringBuilder(); using (var xmlWriter = XmlWriter.Create(stringBuilder, new XmlWriterSettings { Indent = true })) { switch (modelType) { case EdmModelType.Conceptual: edmModel.SerializeAndValidateCsdl(xmlWriter); break; case EdmModelType.Store: edmModel.SerializeAndValidateSsdl(xmlWriter); break; default: throw new ArgumentOutOfRangeException("modelType"); } } Debug.WriteLine(stringBuilder.ToString()); }
public static void Dump(this EdmModel edmModel, EdmModelType modelType) { var stringBuilder = new StringBuilder(); using (var xmlWriter = XmlWriter.Create(stringBuilder, new XmlWriterSettings { Indent = true })) { switch (modelType) { case EdmModelType.Conceptual: SerializeAndValidateCsdl(edmModel, xmlWriter); break; case EdmModelType.Store: SerializeAndValidateSsdl(edmModel, xmlWriter); break; default: throw new ArgumentOutOfRangeException(nameof(modelType)); } } Debug.WriteLine(stringBuilder.ToString()); }