Giter Club home page Giter Club logo

Comments (4)

lewischeng-ms avatar lewischeng-ms commented on August 15, 2024

An EdmxReader directly constructs from a XmlReader but the latter one could not offer any information about the file stream, much less the file name. Also in some condition where the reader takes only a string as input, there will be no file name at all.

from odata.net.

fpintos avatar fpintos commented on August 15, 2024

I suppose we could start with the XmlReader.BaseUri and for the cases where we don't have it (like when created out of a random stream) then whoever asks for the reader should keep track of the 'name' and pass it along. For example, when the EdmxParser calls the GetReferencedModelReader it passes an URI and gets back an XmlReader - anything it reads out of that should use either the reader's BaseUri or the original Uri passed to GetReferencedModelReader as the 'file name'.

The same pattern could be used for the EdmxReader.- we could add overloaded methods to initialize it with the XmlReader and an additional parameter telling it what 'file name' that reader represents and the reader would just pass that along to CsdlLocation objects created from that file.

from odata.net.

lewischeng-ms avatar lewischeng-ms commented on August 15, 2024

We have added a public string property called Source to CsdlLocation to indicate the source Uri of the Xml. For each referenced model, we populate this property with the Uri of it extracted from the top-level Edmx. Users DON'T need to pass any 'name' through XmlReader or directly to EdmxReader. This could help in your scenario and you can expect to see it in v6.10.

from odata.net.

fpintos avatar fpintos commented on August 15, 2024

Awesome, thanks!

Sent from Windows Mail

From: Lewis Cheng
Sent: ‎Monday‎, ‎January‎ ‎19‎, ‎2015 ‎10‎:‎47‎ ‎AM
To: OData/odata.net
Cc: Fabio Pintos

We have added a public string property called Source to CsdlLocation to indicate the source Uri of the Xml. For each referenced model, we populate this property with the Uri of it extracted from the top-level Edmx. Users DON'T need to pass any 'name' through XmlReader or directly to EdmxReader. This could help in your scenario and you can expect to see it in v6.10.


Reply to this email directly or view it on GitHub.

from odata.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.