Created
August 27, 2012 20:03
-
-
Save adjames/3491809 to your computer and use it in GitHub Desktop.
EdmLib load an IEdmModel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static IEdmModel GetEdmModel(string url) | |
{ | |
IEdmModel model = null; | |
IEnumerable<EdmError> errors = null; | |
using (var reader = XmlTextReader.Create(url)) | |
{ | |
if (EdmxReader.TryParse(reader, out model, out errors)) | |
{ | |
return model; | |
} | |
throw new Exception(errors.First().ErrorMessage); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment