从json中的xamarin表单连接数据库 [英] Connect database from xamarin forms in json

查看:229
本文介绍了从json中的xamarin表单连接数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将xamarin表单与JSON数据库服务器连接起来。我有一些字段和一个数据库服务器。我想将xamarin表单连接到数据库表格使用



我尝试过:



how i can connect xamarin forms with JSON database server. i have some fields and one database server . i want to connect xamarin forms to database table using

What I have tried:

how i can connect xamarin forms with JSON database server. i have some fields and one database server . i want to connect xamarin forms to database table using 

推荐答案

将xamarin表单连接到数据库表。没有JSON数据库服务器这样的东西。



如果您在谈论移动应用程序,则不会直接连接到数据库。您将调用一个为您提供数据库工作的Web服务,使用您的应用程序来回传输数据,以可解析的方式格式化数据,例如JSON。
There's no such thing as a "JSON database server".

If you're talking about a mobile application, you wouldn't connect directly to the database. You would be calling a web service that does the database work for you, transferring data back and forth with your app, formatting the data in a parsable fashion, such as JSON.


如前所述,您的Xamarin应用程序需要与以JSON形式提供数据的API或服务进行通信。看一下这篇文章,例如:与Xamarin的乐趣:建设一个带有Web API和SignalR的简单工作记忆游戏应用程序 [ ^ ]



如果您正在使用Web API,这里有一篇更详细的文章:< a href =https://docs.microsoft.com/en-us/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client>从中调用Web API .NET客户端(C#)| Microsoft Docs [ ^ ]
As already stated, your Xamarin app needs to communicate with an API or services that serves data in a form of JSON. Take a look at this article for example: Fun with Xamarin: Building a Simple Working Memory Game App with Web API and SignalR[^]

And here's a more detailed article if you are consuming a Web API: Call a Web API From a .NET Client (C#) | Microsoft Docs[^]


这篇关于从json中的xamarin表单连接数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆