No option to add EDMX file to project in MVC solution2019 Community Moderator ElectionFile Upload ASP.NET MVC 3.0Link to external edmx filesVisual Studio debugging/loading very slowNo connection string named 'MyEntities' could be found in the application config fileReSharper “Cannot resolve symbol” even when project buildsHow to add jQueryUI library in MVC 5 project?Visual Studio 2013 error creating an EDMX fileEntity Framework .edmx update does not update .msl, .csdl, .ssdl files.NET Core 2.0 API with EF6 and .edmx file?Entity Framework - Not able to add edmx file in MVC project

Why is participating in the European Parliamentary elections used as a threat?

Justification failure in beamer enumerate list

Does the Shadow Magic sorcerer's Eyes of the Dark feature work on all Darkness spells or just his/her own?

Why are there no stars visible in cislunar space?

If I cast the Enlarge/Reduce spell on an arrow, what weapon could it count as?

Is xar preinstalled on macOS?

Animating wave motion in water

When did hardware antialiasing start being available?

What are the rules for concealing thieves' tools (or items in general)?

How can an organ that provides biological immortality be unable to regenerate?

Do I need to convey a moral for each of my blog post?

Can a university suspend a student even when he has left university?

Why doesn't the fusion process of the sun speed up?

Jem'Hadar, something strange about their life expectancy

Error in master's thesis, I do not know what to do

What will the Frenchman say?

What (if any) is the reason to buy in small local stores?

Asserting that Atheism and Theism are both faith based positions

When should a starting writer get his own webpage?

Writing in a Christian voice

Why is there so much iron?

What is it called when someone votes for an option that's not their first choice?

Do people actually use the word "kaputt" in conversation?

Why is "la Gestapo" feminine?



No option to add EDMX file to project in MVC solution



2019 Community Moderator ElectionFile Upload ASP.NET MVC 3.0Link to external edmx filesVisual Studio debugging/loading very slowNo connection string named 'MyEntities' could be found in the application config fileReSharper “Cannot resolve symbol” even when project buildsHow to add jQueryUI library in MVC 5 project?Visual Studio 2013 error creating an EDMX fileEntity Framework .edmx update does not update .msl, .csdl, .ssdl files.NET Core 2.0 API with EF6 and .edmx file?Entity Framework - Not able to add edmx file in MVC project










-3















I've created an MVC application. I would like to now add a new class-library project to the solution, and then add an EDMX file to that project.



This used to be easy. But now I have to choose between .NET Core and .NET Standard. But it appears it doesn't matter which I choose because if I create a class library with either of these frameworks, Visual Studio provides no option for adding an EDMX file to them! And I don't see an option to add a standard .NET Frameworks class library.



So what is the secret incantation to add a new project to my MVC solution, and then add an EDMX file to that project?



Note: I do have the option of adding an EDMX file directly to the MVC project. But I would prefer to place it in a separate project, which I've done before.










share|improve this question



















  • 1





    Which version of MVC are you using? This is MVC Core or the asp.net MVC 6? If it is an ASP.NET Core Web App, what framework do you use Full .NET Framework or Core? And what do you mean you don't see the option to add .NET Framework class library? in the Add new project > Windows Desktop > Class Librarly (.NET Framework) template is missing for you?

    – Tamás Huj
    Feb 23 at 23:08











  • @TamásHuj I just went into Visual Studio and selected a new MVC solution. It appears to have built a project for the regular, full .NET app. Are there now multiple ways to create MVC apps?

    – Jonathan Wood
    Feb 24 at 0:01











  • Yes, there is, now there are 2 different MVC frameworks, the old ASP.NET MVC and the new ASP.NET Core MVC. en.wikipedia.org/wiki/ASP.NET_MVC the first one is using the Full .NET Framework, and the second is implemented in .NET Core and it is cross platform.

    – Tamás Huj
    Feb 24 at 11:04















-3















I've created an MVC application. I would like to now add a new class-library project to the solution, and then add an EDMX file to that project.



This used to be easy. But now I have to choose between .NET Core and .NET Standard. But it appears it doesn't matter which I choose because if I create a class library with either of these frameworks, Visual Studio provides no option for adding an EDMX file to them! And I don't see an option to add a standard .NET Frameworks class library.



So what is the secret incantation to add a new project to my MVC solution, and then add an EDMX file to that project?



Note: I do have the option of adding an EDMX file directly to the MVC project. But I would prefer to place it in a separate project, which I've done before.










share|improve this question



















  • 1





    Which version of MVC are you using? This is MVC Core or the asp.net MVC 6? If it is an ASP.NET Core Web App, what framework do you use Full .NET Framework or Core? And what do you mean you don't see the option to add .NET Framework class library? in the Add new project > Windows Desktop > Class Librarly (.NET Framework) template is missing for you?

    – Tamás Huj
    Feb 23 at 23:08











  • @TamásHuj I just went into Visual Studio and selected a new MVC solution. It appears to have built a project for the regular, full .NET app. Are there now multiple ways to create MVC apps?

    – Jonathan Wood
    Feb 24 at 0:01











  • Yes, there is, now there are 2 different MVC frameworks, the old ASP.NET MVC and the new ASP.NET Core MVC. en.wikipedia.org/wiki/ASP.NET_MVC the first one is using the Full .NET Framework, and the second is implemented in .NET Core and it is cross platform.

    – Tamás Huj
    Feb 24 at 11:04













-3












-3








-3








I've created an MVC application. I would like to now add a new class-library project to the solution, and then add an EDMX file to that project.



This used to be easy. But now I have to choose between .NET Core and .NET Standard. But it appears it doesn't matter which I choose because if I create a class library with either of these frameworks, Visual Studio provides no option for adding an EDMX file to them! And I don't see an option to add a standard .NET Frameworks class library.



So what is the secret incantation to add a new project to my MVC solution, and then add an EDMX file to that project?



Note: I do have the option of adding an EDMX file directly to the MVC project. But I would prefer to place it in a separate project, which I've done before.










share|improve this question
















I've created an MVC application. I would like to now add a new class-library project to the solution, and then add an EDMX file to that project.



This used to be easy. But now I have to choose between .NET Core and .NET Standard. But it appears it doesn't matter which I choose because if I create a class library with either of these frameworks, Visual Studio provides no option for adding an EDMX file to them! And I don't see an option to add a standard .NET Frameworks class library.



So what is the secret incantation to add a new project to my MVC solution, and then add an EDMX file to that project?



Note: I do have the option of adding an EDMX file directly to the MVC project. But I would prefer to place it in a separate project, which I've done before.







asp.net-mvc entity-framework edmx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 at 20:26







Jonathan Wood

















asked Feb 21 at 20:14









Jonathan WoodJonathan Wood

43k56191311




43k56191311







  • 1





    Which version of MVC are you using? This is MVC Core or the asp.net MVC 6? If it is an ASP.NET Core Web App, what framework do you use Full .NET Framework or Core? And what do you mean you don't see the option to add .NET Framework class library? in the Add new project > Windows Desktop > Class Librarly (.NET Framework) template is missing for you?

    – Tamás Huj
    Feb 23 at 23:08











  • @TamásHuj I just went into Visual Studio and selected a new MVC solution. It appears to have built a project for the regular, full .NET app. Are there now multiple ways to create MVC apps?

    – Jonathan Wood
    Feb 24 at 0:01











  • Yes, there is, now there are 2 different MVC frameworks, the old ASP.NET MVC and the new ASP.NET Core MVC. en.wikipedia.org/wiki/ASP.NET_MVC the first one is using the Full .NET Framework, and the second is implemented in .NET Core and it is cross platform.

    – Tamás Huj
    Feb 24 at 11:04












  • 1





    Which version of MVC are you using? This is MVC Core or the asp.net MVC 6? If it is an ASP.NET Core Web App, what framework do you use Full .NET Framework or Core? And what do you mean you don't see the option to add .NET Framework class library? in the Add new project > Windows Desktop > Class Librarly (.NET Framework) template is missing for you?

    – Tamás Huj
    Feb 23 at 23:08











  • @TamásHuj I just went into Visual Studio and selected a new MVC solution. It appears to have built a project for the regular, full .NET app. Are there now multiple ways to create MVC apps?

    – Jonathan Wood
    Feb 24 at 0:01











  • Yes, there is, now there are 2 different MVC frameworks, the old ASP.NET MVC and the new ASP.NET Core MVC. en.wikipedia.org/wiki/ASP.NET_MVC the first one is using the Full .NET Framework, and the second is implemented in .NET Core and it is cross platform.

    – Tamás Huj
    Feb 24 at 11:04







1




1





Which version of MVC are you using? This is MVC Core or the asp.net MVC 6? If it is an ASP.NET Core Web App, what framework do you use Full .NET Framework or Core? And what do you mean you don't see the option to add .NET Framework class library? in the Add new project > Windows Desktop > Class Librarly (.NET Framework) template is missing for you?

– Tamás Huj
Feb 23 at 23:08





Which version of MVC are you using? This is MVC Core or the asp.net MVC 6? If it is an ASP.NET Core Web App, what framework do you use Full .NET Framework or Core? And what do you mean you don't see the option to add .NET Framework class library? in the Add new project > Windows Desktop > Class Librarly (.NET Framework) template is missing for you?

– Tamás Huj
Feb 23 at 23:08













@TamásHuj I just went into Visual Studio and selected a new MVC solution. It appears to have built a project for the regular, full .NET app. Are there now multiple ways to create MVC apps?

– Jonathan Wood
Feb 24 at 0:01





@TamásHuj I just went into Visual Studio and selected a new MVC solution. It appears to have built a project for the regular, full .NET app. Are there now multiple ways to create MVC apps?

– Jonathan Wood
Feb 24 at 0:01













Yes, there is, now there are 2 different MVC frameworks, the old ASP.NET MVC and the new ASP.NET Core MVC. en.wikipedia.org/wiki/ASP.NET_MVC the first one is using the Full .NET Framework, and the second is implemented in .NET Core and it is cross platform.

– Tamás Huj
Feb 24 at 11:04





Yes, there is, now there are 2 different MVC frameworks, the old ASP.NET MVC and the new ASP.NET Core MVC. en.wikipedia.org/wiki/ASP.NET_MVC the first one is using the Full .NET Framework, and the second is implemented in .NET Core and it is cross platform.

– Tamás Huj
Feb 24 at 11:04












4 Answers
4






active

oldest

votes


















1














EDMX file is deprecated with EF Core and I believe it has been removed from .net core projects as well.
If you need to do that, you may need to add it to a normal .net 4.5 project and copy the files but this will make no sense using it with .net core or .net standard.



You should be using Code First anyway as it is cleaner and easier to use.



If you already have the database, you can refer to this link, it can help you to scaffold the classes from the database



https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db






share|improve this answer























  • I just want to use Entity Framework. How are the models built if not in an EDMX file?

    – Jonathan Wood
    Feb 23 at 21:27






  • 1





    EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

    – Haitham Shaddad
    Feb 23 at 21:29











  • I'm pretty sure you can still use Entity Framework without using code first.

    – Jonathan Wood
    Feb 23 at 21:31











  • You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

    – Haitham Shaddad
    Feb 23 at 21:34











  • Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

    – Jonathan Wood
    Mar 3 at 17:52


















0














@Jonathan: The EDMX file is old way of doing things. EDMX is nothing but a T4 template which facilitates in creation of edmx.



With .Net Core the best way is to:
1. Create a .net core library project. Add entityframeworkcore nuget package from here
2. The use this link, to generate your model's from DB



The concept of EDMX is not supported anymore.



Hope this helps.






share|improve this answer























  • Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

    – Jonathan Wood
    Mar 3 at 17:51


















-1














Based on your description you're using the old ASP.NET MVC framework, and not the new Core one, and in this case you're using the Full .NET framework. So, when you create the new Class Library project, you should do it with the Full .NET Framework, because .NET Core and .NET Standard does not support, EDMX. If you chose this one, you can add your ADO.NET Entity Data model to it:



enter image description here






share|improve this answer























  • But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

    – Jonathan Wood
    Mar 3 at 17:54











  • Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

    – Tamás Huj
    Mar 3 at 20:50


















-1














At least for EF v6, if your using EF Migrations, each ('state'/'target') snapshot of the database (stored within the migrations-history db table & migration file) is an EDMX file just waiting to be decoded, saved to a file, and then loaded in VS (Visual Studio). ;)



It's a little in-depth (or at least challenging), but 'System.Data.Entity.Migrations.Edm.ModelCompressor' may present the clue.



Basically, you can extract the EDMX from one/the relevant migration. But I do agree that the Code-First approach should be used for the implementation, the EDMX is only a development-aid these days.






share|improve this answer

























  • Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

    – Gert Arnold
    Mar 4 at 15:17











  • I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

    – DennisVM-D2i
    Mar 6 at 15:05











  • We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

    – Gert Arnold
    Mar 6 at 16:36











  • I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

    – DennisVM-D2i
    Mar 7 at 18:49










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54815504%2fno-option-to-add-edmx-file-to-project-in-mvc-solution%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























4 Answers
4






active

oldest

votes








4 Answers
4






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














EDMX file is deprecated with EF Core and I believe it has been removed from .net core projects as well.
If you need to do that, you may need to add it to a normal .net 4.5 project and copy the files but this will make no sense using it with .net core or .net standard.



You should be using Code First anyway as it is cleaner and easier to use.



If you already have the database, you can refer to this link, it can help you to scaffold the classes from the database



https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db






share|improve this answer























  • I just want to use Entity Framework. How are the models built if not in an EDMX file?

    – Jonathan Wood
    Feb 23 at 21:27






  • 1





    EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

    – Haitham Shaddad
    Feb 23 at 21:29











  • I'm pretty sure you can still use Entity Framework without using code first.

    – Jonathan Wood
    Feb 23 at 21:31











  • You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

    – Haitham Shaddad
    Feb 23 at 21:34











  • Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

    – Jonathan Wood
    Mar 3 at 17:52















1














EDMX file is deprecated with EF Core and I believe it has been removed from .net core projects as well.
If you need to do that, you may need to add it to a normal .net 4.5 project and copy the files but this will make no sense using it with .net core or .net standard.



You should be using Code First anyway as it is cleaner and easier to use.



If you already have the database, you can refer to this link, it can help you to scaffold the classes from the database



https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db






share|improve this answer























  • I just want to use Entity Framework. How are the models built if not in an EDMX file?

    – Jonathan Wood
    Feb 23 at 21:27






  • 1





    EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

    – Haitham Shaddad
    Feb 23 at 21:29











  • I'm pretty sure you can still use Entity Framework without using code first.

    – Jonathan Wood
    Feb 23 at 21:31











  • You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

    – Haitham Shaddad
    Feb 23 at 21:34











  • Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

    – Jonathan Wood
    Mar 3 at 17:52













1












1








1







EDMX file is deprecated with EF Core and I believe it has been removed from .net core projects as well.
If you need to do that, you may need to add it to a normal .net 4.5 project and copy the files but this will make no sense using it with .net core or .net standard.



You should be using Code First anyway as it is cleaner and easier to use.



If you already have the database, you can refer to this link, it can help you to scaffold the classes from the database



https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db






share|improve this answer













EDMX file is deprecated with EF Core and I believe it has been removed from .net core projects as well.
If you need to do that, you may need to add it to a normal .net 4.5 project and copy the files but this will make no sense using it with .net core or .net standard.



You should be using Code First anyway as it is cleaner and easier to use.



If you already have the database, you can refer to this link, it can help you to scaffold the classes from the database



https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 23 at 21:21









Haitham ShaddadHaitham Shaddad

3,3151815




3,3151815












  • I just want to use Entity Framework. How are the models built if not in an EDMX file?

    – Jonathan Wood
    Feb 23 at 21:27






  • 1





    EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

    – Haitham Shaddad
    Feb 23 at 21:29











  • I'm pretty sure you can still use Entity Framework without using code first.

    – Jonathan Wood
    Feb 23 at 21:31











  • You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

    – Haitham Shaddad
    Feb 23 at 21:34











  • Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

    – Jonathan Wood
    Mar 3 at 17:52

















  • I just want to use Entity Framework. How are the models built if not in an EDMX file?

    – Jonathan Wood
    Feb 23 at 21:27






  • 1





    EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

    – Haitham Shaddad
    Feb 23 at 21:29











  • I'm pretty sure you can still use Entity Framework without using code first.

    – Jonathan Wood
    Feb 23 at 21:31











  • You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

    – Haitham Shaddad
    Feb 23 at 21:34











  • Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

    – Jonathan Wood
    Mar 3 at 17:52
















I just want to use Entity Framework. How are the models built if not in an EDMX file?

– Jonathan Wood
Feb 23 at 21:27





I just want to use Entity Framework. How are the models built if not in an EDMX file?

– Jonathan Wood
Feb 23 at 21:27




1




1





EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

– Haitham Shaddad
Feb 23 at 21:29





EDMX file is just one old way of using EF. The recommended way is to use Code First. This where you define the Context class and the entity classes and use something called Migration to create your database and whenever you need to update the database, you just edit the entity classes that map to the tables and create a new migration which will script only the changes and apply it through the database. Follow the link I shared to know more

– Haitham Shaddad
Feb 23 at 21:29













I'm pretty sure you can still use Entity Framework without using code first.

– Jonathan Wood
Feb 23 at 21:31





I'm pretty sure you can still use Entity Framework without using code first.

– Jonathan Wood
Feb 23 at 21:31













You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

– Haitham Shaddad
Feb 23 at 21:34





You can and you can do that by copying the files from a standard .net 4.5 project but in this case it will not be a .net core project and better to go with normal full .net project and you will be using something that is deprecated

– Haitham Shaddad
Feb 23 at 21:34













Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

– Jonathan Wood
Mar 3 at 17:52





Having to copy files from a different type of project is not support for something. This used to be supported. Now I'm hearing it isn't. I'm missing something.

– Jonathan Wood
Mar 3 at 17:52













0














@Jonathan: The EDMX file is old way of doing things. EDMX is nothing but a T4 template which facilitates in creation of edmx.



With .Net Core the best way is to:
1. Create a .net core library project. Add entityframeworkcore nuget package from here
2. The use this link, to generate your model's from DB



The concept of EDMX is not supported anymore.



Hope this helps.






share|improve this answer























  • Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

    – Jonathan Wood
    Mar 3 at 17:51















0














@Jonathan: The EDMX file is old way of doing things. EDMX is nothing but a T4 template which facilitates in creation of edmx.



With .Net Core the best way is to:
1. Create a .net core library project. Add entityframeworkcore nuget package from here
2. The use this link, to generate your model's from DB



The concept of EDMX is not supported anymore.



Hope this helps.






share|improve this answer























  • Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

    – Jonathan Wood
    Mar 3 at 17:51













0












0








0







@Jonathan: The EDMX file is old way of doing things. EDMX is nothing but a T4 template which facilitates in creation of edmx.



With .Net Core the best way is to:
1. Create a .net core library project. Add entityframeworkcore nuget package from here
2. The use this link, to generate your model's from DB



The concept of EDMX is not supported anymore.



Hope this helps.






share|improve this answer













@Jonathan: The EDMX file is old way of doing things. EDMX is nothing but a T4 template which facilitates in creation of edmx.



With .Net Core the best way is to:
1. Create a .net core library project. Add entityframeworkcore nuget package from here
2. The use this link, to generate your model's from DB



The concept of EDMX is not supported anymore.



Hope this helps.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 2 at 11:45









r2018r2018

18318




18318












  • Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

    – Jonathan Wood
    Mar 3 at 17:51

















  • Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

    – Jonathan Wood
    Mar 3 at 17:51
















Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

– Jonathan Wood
Mar 3 at 17:51





Are you saying that, where previously support for Entity Framework was built in, I now need to download packages? Why is this moving backwards?

– Jonathan Wood
Mar 3 at 17:51











-1














Based on your description you're using the old ASP.NET MVC framework, and not the new Core one, and in this case you're using the Full .NET framework. So, when you create the new Class Library project, you should do it with the Full .NET Framework, because .NET Core and .NET Standard does not support, EDMX. If you chose this one, you can add your ADO.NET Entity Data model to it:



enter image description here






share|improve this answer























  • But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

    – Jonathan Wood
    Mar 3 at 17:54











  • Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

    – Tamás Huj
    Mar 3 at 20:50















-1














Based on your description you're using the old ASP.NET MVC framework, and not the new Core one, and in this case you're using the Full .NET framework. So, when you create the new Class Library project, you should do it with the Full .NET Framework, because .NET Core and .NET Standard does not support, EDMX. If you chose this one, you can add your ADO.NET Entity Data model to it:



enter image description here






share|improve this answer























  • But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

    – Jonathan Wood
    Mar 3 at 17:54











  • Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

    – Tamás Huj
    Mar 3 at 20:50













-1












-1








-1







Based on your description you're using the old ASP.NET MVC framework, and not the new Core one, and in this case you're using the Full .NET framework. So, when you create the new Class Library project, you should do it with the Full .NET Framework, because .NET Core and .NET Standard does not support, EDMX. If you chose this one, you can add your ADO.NET Entity Data model to it:



enter image description here






share|improve this answer













Based on your description you're using the old ASP.NET MVC framework, and not the new Core one, and in this case you're using the Full .NET framework. So, when you create the new Class Library project, you should do it with the Full .NET Framework, because .NET Core and .NET Standard does not support, EDMX. If you chose this one, you can add your ADO.NET Entity Data model to it:



enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 24 at 11:01









Tamás HujTamás Huj

4741513




4741513












  • But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

    – Jonathan Wood
    Mar 3 at 17:54











  • Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

    – Tamás Huj
    Mar 3 at 20:50

















  • But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

    – Jonathan Wood
    Mar 3 at 17:54











  • Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

    – Tamás Huj
    Mar 3 at 20:50
















But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

– Jonathan Wood
Mar 3 at 17:54





But I think you can add a Core project to a solution that already has a Standard project. So I'm not sure why it matters what my existing project uses.

– Jonathan Wood
Mar 3 at 17:54













Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

– Tamás Huj
Mar 3 at 20:50





Standard is compatible with Core and full .NET Framework. This means, that you can add The Standard to an existing Core project or to an existing full .NET Framework project. But as they mention in the other comments, Core and Standard does not support EDMX, so if you want to use it you'll need the full .NET Framework, this is what I tried to explain, that you'll need to add the Class Library with the full .NET Framework.

– Tamás Huj
Mar 3 at 20:50











-1














At least for EF v6, if your using EF Migrations, each ('state'/'target') snapshot of the database (stored within the migrations-history db table & migration file) is an EDMX file just waiting to be decoded, saved to a file, and then loaded in VS (Visual Studio). ;)



It's a little in-depth (or at least challenging), but 'System.Data.Entity.Migrations.Edm.ModelCompressor' may present the clue.



Basically, you can extract the EDMX from one/the relevant migration. But I do agree that the Code-First approach should be used for the implementation, the EDMX is only a development-aid these days.






share|improve this answer

























  • Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

    – Gert Arnold
    Mar 4 at 15:17











  • I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

    – DennisVM-D2i
    Mar 6 at 15:05











  • We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

    – Gert Arnold
    Mar 6 at 16:36











  • I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

    – DennisVM-D2i
    Mar 7 at 18:49















-1














At least for EF v6, if your using EF Migrations, each ('state'/'target') snapshot of the database (stored within the migrations-history db table & migration file) is an EDMX file just waiting to be decoded, saved to a file, and then loaded in VS (Visual Studio). ;)



It's a little in-depth (or at least challenging), but 'System.Data.Entity.Migrations.Edm.ModelCompressor' may present the clue.



Basically, you can extract the EDMX from one/the relevant migration. But I do agree that the Code-First approach should be used for the implementation, the EDMX is only a development-aid these days.






share|improve this answer

























  • Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

    – Gert Arnold
    Mar 4 at 15:17











  • I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

    – DennisVM-D2i
    Mar 6 at 15:05











  • We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

    – Gert Arnold
    Mar 6 at 16:36











  • I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

    – DennisVM-D2i
    Mar 7 at 18:49













-1












-1








-1







At least for EF v6, if your using EF Migrations, each ('state'/'target') snapshot of the database (stored within the migrations-history db table & migration file) is an EDMX file just waiting to be decoded, saved to a file, and then loaded in VS (Visual Studio). ;)



It's a little in-depth (or at least challenging), but 'System.Data.Entity.Migrations.Edm.ModelCompressor' may present the clue.



Basically, you can extract the EDMX from one/the relevant migration. But I do agree that the Code-First approach should be used for the implementation, the EDMX is only a development-aid these days.






share|improve this answer















At least for EF v6, if your using EF Migrations, each ('state'/'target') snapshot of the database (stored within the migrations-history db table & migration file) is an EDMX file just waiting to be decoded, saved to a file, and then loaded in VS (Visual Studio). ;)



It's a little in-depth (or at least challenging), but 'System.Data.Entity.Migrations.Edm.ModelCompressor' may present the clue.



Basically, you can extract the EDMX from one/the relevant migration. But I do agree that the Code-First approach should be used for the implementation, the EDMX is only a development-aid these days.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 7 at 18:50

























answered Mar 2 at 10:34









DennisVM-D2iDennisVM-D2i

113




113












  • Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

    – Gert Arnold
    Mar 4 at 15:17











  • I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

    – DennisVM-D2i
    Mar 6 at 15:05











  • We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

    – Gert Arnold
    Mar 6 at 16:36











  • I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

    – DennisVM-D2i
    Mar 7 at 18:49

















  • Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

    – Gert Arnold
    Mar 4 at 15:17











  • I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

    – DennisVM-D2i
    Mar 6 at 15:05











  • We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

    – Gert Arnold
    Mar 6 at 16:36











  • I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

    – DennisVM-D2i
    Mar 7 at 18:49
















Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

– Gert Arnold
Mar 4 at 15:17





Pretty vague what you say here. If you're suggesting that an EDMX can be built from info in the migrations table you're wrong.

– Gert Arnold
Mar 4 at 15:17













I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

– DennisVM-D2i
Mar 6 at 15:05





I'm afraid I'm right - at least as far as EFv6, you just need to know how to do it; here's a clue - see 'System.Data.Entity.Migrations.Edm.ModelCompressor'.

– DennisVM-D2i
Mar 6 at 15:05













We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

– Gert Arnold
Mar 6 at 16:36





We're not doing escape rooms here. Your answer should be clear, not just a vague hint. It's not clear how this helps OP simply to add an EDMX to their project while in Visual Studio.

– Gert Arnold
Mar 6 at 16:36













I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

– DennisVM-D2i
Mar 7 at 18:49





I was trying to point out that an EDMX might already be available under the hood - prime for the picking & to build upon, within the migrations-history table, but I didn't want to overload this topic with what is possibly a less direct answer/solution.

– DennisVM-D2i
Mar 7 at 18:49

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54815504%2fno-option-to-add-edmx-file-to-project-in-mvc-solution%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived