Giter VIP home page Giter VIP logo

Comments (9)

dbroudy avatar dbroudy commented on August 25, 2024

My initial thought is that there's some aspect of your entity model that isn't supported correctly by this library. There's so much possible variation in models that exist in the wild, it's hard to cover every scenario with the simple model used in our unit tests. However it's very much my intent to cover any model that EF supports. While the unit tests also don't cover loading from edmx files, there's very little code that's unique to that and to the best of my knowledge, it should be working.

Can you provide your edmx file or anything that might be unique about your model? Is this something that just started happening with newer versions?

from lazyentitygraph.

dhazel avatar dhazel commented on August 25, 2024

This happened as well when I tried the 1.x version a few months ago.
I can't share my edmx file, but I will make some time to see if I can reproduce the problem with a smaller edmx file that I can share.

from lazyentitygraph.

dhazel avatar dhazel commented on August 25, 2024

I recreated the problem with a small sample database and the default settings to generate the edmx off of the database. Everything is default.

Below is my edmx (as a txt so it would upload to github).

Model1.edmx.txt

from lazyentitygraph.

dbroudy avatar dbroudy commented on August 25, 2024

Thanks David, yes, easy to reproduce. I haven't used edmx much, but it seems like the ClrType attribute is missing from the tool generated files, though it can be added manually to the xml and it's present in the cached edmx that the code first approach generates. I was hoping that the process of resolving a type when loading the model would add the custom attributes to the metadata, but that does not appear to be the case.

I'll have to look into some other approaches, but it doesn't looks like edmx is functional right now.

from lazyentitygraph.

dbroudy avatar dbroudy commented on August 25, 2024

@alexfoxgill do you happen to remember any details from when you built the EDMX support in LazyEntityGraph? It tests out ok with an EDMX from the code first tests, but not with one build using the Visual Studio tooling. Maybe the tooling changed, or this isn't something that's being commonly used?

from lazyentitygraph.

alexfoxgill avatar alexfoxgill commented on August 25, 2024

Here's the SO post I used to get the CLR type from an EntityType https://stackoverflow.com/questions/22999330/mapping-from-iedmentity-to-clr - looks like EF6 might have made some changes (the EDMX stuff was written against EF5), perhaps this answer might help

from lazyentitygraph.

dbroudy avatar dbroudy commented on August 25, 2024

Thanks Alex, that helps a lot.

from lazyentitygraph.

ika-microsoft avatar ika-microsoft commented on August 25, 2024

Ran into the same issue. Any plans to fix this bug?

from lazyentitygraph.

dbroudy avatar dbroudy commented on August 25, 2024

@ika-microsoft Unfortunately it's a little bigger than just a bug, it looks like there's a new metadata model in EF6 and moving to that will fix this. I believe it's similar, but less well documented, to the metadata model in EF Core, so it should be a similar implementation.

I don't personally use EDMX, so I haven't gotten around to taking a deeper look at this.

from lazyentitygraph.

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.