简体   繁体   中英

I want to connect android application with sql server with web service

i want to build an android application and i need to save and retrieve data from sql server database

so i need to do that with web service

i dont have knowledge in web services and how they are done

so can you help me what is the best way to do the web service and connect my android client with sql database

That's a pretty broad question, but here are the basics. A web service is a program or app that runs on a web server, usually exposed to the internet, or within a company's LAN on their intranet. Web Services can be built using ASP.NET or JAVA or PHP. I've used ASP.NET, specifically Web API 2.0, and Entity Framework. Entity Framework makes it very easy to connect your Web Service to your SQL Server database. With Web API and Entity Framework, you can create your web service and connect it to your database with basic Read/Add/Update/Delete capability in 1-2 hours.

Once you write your web service, you need to publish it on a Web Server as a Web App. I typically publish to an IIS Web Server (also Microsoft). For that you need a Website Hosted account with a Microsoft based server. Microsoft can host your Web Service using the Azure Cloud service. You can check out some tutorials for building your Web Service using the technologies mentioned and deploying to the Web using Azure. You can get a free Azure account to start with. Then, if you need to use it for a long time, you might need to pay for hosting fees.

This is probably the easiest and best way for you to get started, particularly if you are new to web services.

Good Luck!

Here is a tutorial using the technologies I've mentioned, except for Azure. But you should be able to find a tutorial for publishing a web service to Azure separately.

https://www.c-sharpcorner.com/article/asp-net-web-api-crud-logics-using-entity-framework-without-writing-single-code/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM