I'm trying to connect a Xamarin.Forms App to a SQL Server and I want it to be able to get data from it. The app isn't going to be connected to the internet, only to a local network. Is there any way I can connect the App directly to the SQL Server?
You can probably connect using the SQLClient, but that's terrible practice.
You should expose a Service (Web API or similar) on the server on which the database resides, and and then communicate with that Service from the Xamarin.Forms application.
its not a good Idea but maybe you have your reasons for doing this ...
you can use Entity Framework and create your connection as your application context just like what you would do with a web api and you can add/remove/edit your tables as easy as doing so with a list of objects.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies