entity framework 7 for visual studio code editor - entity-framework

I want to add the entity framework 7 to my asp.net core application in visual studio code editor. Can I add this using command prompt. If can anyone provide commands. Orelse Is there any other ways to do it??
Please advice. Thanks.

Visual Studio Code is an editor and not Visual Studio IDE as you know it, It doesn't install any packages.You have to install them manually.
Here is an tutorial:
https://docs.efproject.net/en/latest/platforms/aspnetcore/new-db.html
You can install the C# extension from the VS Code Marketplace:
ext install csharp
https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
Installing Entity Framework for .Net Core
In .NET Core just add the project.json(with all required references) to your project and then call:
dotnet restore
Installing EntityFramwork for .Net Full(4.X)
You need Package Manager Console:
Install-Package EntityFramework

Related

How do you setup Visual Studio for Mac and NUnit

I am using Visual Studio for Mac version 8.5.4 (build 12) and I used NuGet to install Nunit package. I can create a Project NUnit but when I attempt to reference my project I want to test I can't choose my project because it says the .Net target framework is incompatible.
When I added the NUnit project it asked me to pick the target framework and only gave me the option of 2.0, 3.0 and 3.1. Even when I change my project down to 3.1 it still says it's incompatible.
How do you setup Visual Studio for Mac and NUnit
Edit: .Net Standard
Edit 2: I was WRONG. I was using .Net Core and .Net standard together and that was the problem. Thank you everyone.
I was using .Net Core and .Net Standard when I wanted to use .Net Standard for everything.

dotnetcore Nuget enable Pre-Release

I've started using dotnetcore for a hobby project.
I'm having an issue trying to install NLog. The Visual Studio Code editor seems to recognise the beta version as the intelisense suggests it inside the project.json file. However nuget doesn't seem to restore it.
Is there a way to enable pre-release on Nuget packages in the new dotnet core platform?
Is the package on the Nuget repo? Check this link to see if its listed:
https://www.nuget.org/packages/NLog
If it's on there you can just add it to your project.json and then run a dotnet restore to install the nuget, no intellisense required.
I came across the answer to my question whilst watching a PluralSight video on Entity Framework Core By Dr Scott Allen.
One option is to use the visual studio package manager console and use the -pre flag. e.g:
install-package Microsoft.EntityFrameworkCore.tools -pre

Can't Install Entity Framework via NuGet in ASP.NET MVC

I want to make use of Entity Framework in my project.
So I opened up my package installer console in Visual Studio 2015 and I typed in the following:
Install-Package EntityFramework -projectname SportsStore.Domain
But I get an error! Here is what I get:
Updating NuGet solved it for me.

visual studio 2012 ultimate incompatible

I just installed Visual Studio 2012 Ultimate and then i Install Entity Framework using package manager console now when i open my project class library loaded successfully but my mvc web project not load
It gives me the error
incompatible.
Is your WebProject MVC 1 or 2? If yes, then according to this article you should run an upgrade to MVC3.
If it is not, then this article mentions another way to open this project.

Visual Studio 2012 does not have Entity Framework menu

My copy of Visual Studio 2012 does not have Entity Framework menu.
How can I get it?
http://msdn.microsoft.com/zh-cn/data/jj200620
I'm using Visual Studio 2012 Update 2.
There are 2 things to install if using entity framework:
Entity Framework in Package manager console
PM> Install-Package EntityFramework
or
Install-package EntityFramework -pre if after the EF6 in its current state
The Entity Framework powertools
http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d
The powertools offer some good options that appear in that context menu
Remember to right click on a file containing DBContext to get the right behavior.
You can install it from Entity Framework Power Tools. It is an add-on for Visual Studio