Using npgsql with EF6 in asp.net 5

社会主义新天地 提交于 2019-12-12 04:17:37

问题


Is there documentation as how to install npgsql supporting EF6 in asp.net 5 enviroment ?

Or an example?


回答1:


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/.

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

(I assume at some point this package will be renamed from EF7.Npgsql to EFCore.Npgsql... see https://github.com/npgsql/npgsql/issues/966)



来源:https://stackoverflow.com/questions/35181336/using-npgsql-with-ef6-in-asp-net-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!