Different ways to connect to SQL Server using Visual Studio on Mac

匿名 (未验证) 提交于 2019-12-03 09:58:14

问题:

I am using Visual Studio on Mac (release edition) and I want to connect to a SQL Server.

I am aware that probably the most recommended way would be to create a web service and I understand why.

However, I am so unsuccessful in doing it any other way. Surely a web backend is not the only way?

I can't seem to link to the Entity Framework and the System.Data.SqlClient does not work either.

Am I missing something crucial? I can set it up successfully in VSCode, but not when I want to create a Mac OS app.

In both cases, I am making an app that is "mobile" on my computer.

Setting up SQLite is not a problem, but I am after sharing data between apps - is a web service, other than just being recommended actually the only way to do this within Xamarin?

回答1:

You'll need to use the 'Core' version of the Entity Framework:

See: https://docs.microsoft.com/en-us/ef/core/



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