Comments (13)
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.
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.
Sure @EngrKhizarIqbal ,
Please share it here [email protected]
from entityframework-classic.
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.
Hi, I was out of town. I'll share the project tomorrow.
Thanks.
from entityframework-classic.
Awesome!
thank you for the updates!
Jon
from entityframework-classic.
Hi @JonathanMagnan, Here is the example code.
https://github.com/EngrKhizarIqbal/ef-classic-migrations
from entityframework-classic.
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.
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.
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.
Awesome,
So everything is correct? Just to be sure ;)
from entityframework-classic.
Yes. Everything is working as expected.
Thanks.
from entityframework-classic.
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)
- Type not supported yet (LazyType): sdo_geometry HOT 11
- "Cannot bind argument to parameter 'Path' because it is an empty string" when running Add-Migration HOT 9
- Include with InvalidCastException exception HOT 4
- IDbContext HOT 8
- EF6 is available for .NET Core 3+ HOT 1
- HasNoKey and Constructor with Parameters HOT 5
- Make DbMigrator constructors public HOT 4
- Link to entityframework.net HOT 3
- Count() inside string expression in Execute method HOT 4
- Creating new array inside expression string - Execute extension method HOT 8
- Error when using UpdateFromQuery on an expanded query (Linqkit) HOT 3
- DbMigrator - Problems with existing migrations HOT 6
- HierarchyId.GetAncestor method raise an unexpected exception HOT 7
- Current Values are not reset when using SoftDelete HOT 6
- this.Configuration not availalbe in .net core 6 for soft delete HOT 3
- EDMX - Unable to cast object of type ObjectQuery to DbQuery in .Include() HOT 19
- The object cannot be deleted because it was not found in the ObjectStateManager HOT 1
- IDbCommandInterceptor called multiple times on queries with .IncludeOptimizedByPath() HOT 2
- add new provider Microsoft.Data.SqlClient HOT 3
- Unable to load the specified metadata resource. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entityframework-classic.