Giter VIP home page Giter VIP logo

Comments (13)

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @EngrKhizarIqbal ,

All you have to do is to create for example a console application (.NET Framework), add entities and generate the migration from it as you would normally do without .NET Core

So you will be able to use this project to generate and apply your migration. It's probably possible to add it to your main project but some additional steps might be required if you don't use the same exact namespace.

Let me know if that answers your question.

Best Regards,

Jonathan

from entityframework-classic.

EngrKhizarIqbal avatar EngrKhizarIqbal commented on June 12, 2024

It's probably possible to add it to your main project but some additional steps might be required if you don't use the same exact namespace.

That's what we are facing the problem. We have successfully created migrations in a class project with EntityFramework. We are using FluentAPI to configure our entities but we have to create two configurations for each entity. One is to use with Z and others with EntityFramework as when using Z, modelBuilder.Configurations.Add(); expects configuration which inherits from your Z, not from EntityFramework and same goes for the opposite.

If you want, I can share the sample code I've worked on.

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Sure @EngrKhizarIqbal ,

Please share it here [email protected]

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

hello @EngrKhizarIqbal,

Since our last conversation, we haven't heard from you.

Don't hesitate to share your project via our email [email protected]

Looking forward to hearing from you,

Jon

from entityframework-classic.

EngrKhizarIqbal avatar EngrKhizarIqbal commented on June 12, 2024

Hi, I was out of town. I'll share the project tomorrow.

Thanks.

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Awesome!

thank you for the updates!

Jon

from entityframework-classic.

EngrKhizarIqbal avatar EngrKhizarIqbal commented on June 12, 2024

Hi @JonathanMagnan, Here is the example code.
https://github.com/EngrKhizarIqbal/ef-classic-migrations

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @EngrKhizarIqbal ,

Just to let you know that we started to look at it.

At first sight, we find it strange that you didn't use the migration directly from EF Classic.

However, when we tried it, we got the following exception:

Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not load file or assembly 'Z.EntityFramework.Classic, Version=7.0.0.0, Culture=neutral, PublicKeyToken=afc61983f100d280' or one of its dependencies. Strong name signature could not be verified.  
The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)"

which seems to be our fault but we are not sure why yet.

We are currently looking at it.

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Hello @EngrKhizarIqbal ,

A new version has been released (v7.1.20) fixing an issue with the signed key.

However, when I re-read your issue, I'm not sure that changing the dependencies in your EFMigrations project is what you are looking for.

Is the EntityFramework dll is really needed or it was only needed for the EFMigrations project?

If that was only required for the EFMigrations projects then I recommend you remove the dependencies and go all the way with EF Classic. The command line should now work correctly with our library

from entityframework-classic.

EngrKhizarIqbal avatar EngrKhizarIqbal commented on June 12, 2024

Hi @JonathanMagnan Thanks for the update. Yes, now Migrations are working with the EntityFramework-Classic.

EFMigrations projects are to create migrations as was recommended by EntityFramework-Classic and now this is removed from limitations. I've updated the project, tested it and pushed the updated code on the repo here.

Thanks for your help.

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Awesome,

So everything is correct? Just to be sure ;)

from entityframework-classic.

EngrKhizarIqbal avatar EngrKhizarIqbal commented on June 12, 2024

Yes. Everything is working as expected.

Thanks.

from entityframework-classic.

JonathanMagnan avatar JonathanMagnan commented on June 12, 2024

Awesome @EngrKhizarIqbal,

We will close this issue since we were able to solve it!
Feel free to contact us for questions, issues or feedback.

Best Regards,

Jon

from entityframework-classic.

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.