在asp.net 5中将EF6与npgsql一起使用 [英] Using npgsql with EF6 in asp.net 5
问题描述
是否有文档说明如何在asp.net 5环境中安装支持EF6的npgsql?
Is there documentation as how to install npgsql supporting EF6 in asp.net 5 enviroment ?
还是一个例子?
推荐答案
此博客文章介绍了如何将EF6与ASP.NET 5一起使用. https://www.nuget.org/packages/Npgsql.EntityFramework/.
This blog post goes over using EF6 with ASP.NET 5. http://blog.tonysneed.com/2016/01/22/ef6-asp-net-core-mvc6/ In theory you just need to use https://www.nuget.org/packages/Npgsql.EntityFramework/.
但是请谨慎使用:EF6不(也将不)支持.NET Core,仅支持完整的.NET Framework.EF Core是EF的新版本,旨在支持.NET Core上的ASP.NET Core.Npgsql支持EF Core,可在以下位置获得: https://www.nuget.org/packages/EntityFramework7.Npgsql/参见此处的文档: http://www.npgsql.org/doc/ef7.html
Use caution howerver: EF6 does not (and will not) support .NET Core, only the full .NET Framework. EF Core is a new version of EF, designed to support ASP.NET Core on .NET Core. Npgsql has support for EF Core and is available here: https://www.nuget.org/packages/EntityFramework7.Npgsql/ See docs here: http://www.npgsql.org/doc/ef7.html
(我假设在某些时候该包将从EF7.Npgsql重命名为EFCore.Npgsql ...请参见
(I assume at some point this package will be renamed from EF7.Npgsql to EFCore.Npgsql... see https://github.com/npgsql/npgsql/issues/966)
这篇关于在asp.net 5中将EF6与npgsql一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!