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
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
add a comment |
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
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
add a comment |
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
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
asp.net-mvc entity-framework edmx
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
add a comment |
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
add a comment |
4 Answers
4
active
oldest
votes
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
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
add a comment |
@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.
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
add a comment |
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:
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
add a comment |
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.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
@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.
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
add a comment |
@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.
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
add a comment |
@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.
@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.
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
add a comment |
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
add a comment |
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:
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
add a comment |
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:
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
add a comment |
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:
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:
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
add a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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