如何将Android数据发送到.Net数据库。 [英] How Do I Send Android Data To .Net Database.

查看:118
本文介绍了如何将Android数据发送到.Net数据库。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个将设备imei号码发送到.net数据库的Android应用程序。
.net中的
使用实体framwork和web api插入imei号码。

i want to create a android app that send device imei number to .net database.
in .net insert the imei number using entity framwork and web api.

推荐答案

既然你要使用Web API,你为什么要自己使用本机.NET框架呢?



你应该构建一个简单的Android应用程序,并添加默认的WebView控件。然后,哪个可以定位您的API。你对 ASP了解多少.NET Web API [ ^ ]?如果没有,那么请在那里学习。您还应该对ASP.NET Web API中的路由有足够的了解;它与ASP.NET MVC Routing略有不同。



然后,您可以从Android应用程序传递数据。在应用程序中,存储要发送到Web API的所有数据。创建路由时,请确保创建一个有效的例程方案,以便上载数据。在Web API上,使用Entity框架提交对数据库的所有更改。没有必要涉及本机.NET框架的过程,在这种情况下只需坚持使用Web API。



此外只有SQL Server数据库,没有.NET数据库。
Since you are going to use Web API, why are you confusing yourself to use native .NET framework at all?

You should build a simple Android application with default WebView control added to it. Which can then target your API. Do you know much about ASP.NET Web API[^]? If not then please learn it there. You should also have enough understanding of routing in ASP.NET Web API; it is just a little different from ASP.NET MVC Routing.

Then, you can pass your data from Android application. In your application store all of the data that you want to send to your Web API. While creating the routing make sure you create an efficient routine scheme which would let you upload the data. On the Web API use Entity framework to commit all of the changes to your database. There is no need to involve native .NET framework's procedures, just stick to the Web API in this case.

Also there is only SQL Server database, there is no .NET database.


可以你能给我发一些示例。
could you please send me some sample examples.


这篇关于如何将Android数据发送到.Net数据库。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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