Can I use a EF7 Code First in a Class Library to be referenced by a Console Application?
I'm preparing/creating a Database to be used in multiple projects in the future. Now I need to play around with EF7 but not in ASP. Im ok with Console.
Now in a console application to management the first data. Then in the Final Release of ASP.NET Core 1.
Thanks.
EF/NuGet
Assuming you are using Visual Studio, you would use the built in NuGet functionality to download and install the package. Here is a detailed tutorial .
The easiest thing to do from that link is to open the Package Manager Console
window and type the following: Install-Package EntityFramework
. This will install the latest version which happens to currently be 6.1.3
.
EF Without NuGet
If you don't use Visual Studio or you cannot use NuGet for whatever reason, you can manually download the package from the EF NuGet Site and rename it from a .nupkg
extension to a .zip
extension and extract the DLL from the lib
folder.
EF7
Now your question specifically mentions EF7
which is can be installed using NuGet with the following command: Install-Package EntityFramework.Commands -Pre
in the Package Manager Console.
If you don't have NuGet, you can follow the steps above or download the source from GitHub and build the DLL yourself. Having said that, it is a RC so use at your own risk.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.