I have a problem with sharing entities in 2 different solutions. I have one entity (Country
) that I need in 2 solutions. One solution it's a web application and the other it's a console application but I need this entity in both.
Additionally, we are doing migrations and I don't know what the behaviour of code first is in this case if I change the entity twice one per solution.
It is possible to share entities between solutions in entity framework 6 code first?
If I understood correctly you want to use an entitie which is contained in a project and use it botjh in a web project and a console project. You can do that by referencing the output dll of your entities project from where you need it.
In your case you would add a reference to entities.dll on the consoleapplication project and another one on the webapplication project.
Personally I would have all the projects in the same solution and reference each project I needed. But it is possible to do it your way.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments