I'm brand new to Xamarin.Forms and Visual Studio (2017 on PC). I'm working with code another (experienced) dev wrote in C# and .NET.
I have a Xamarin app. The app asks me to input data. Then, it saves that data to a SQL Server database via a Web API. Next, later, the app gets that data back from the database to do something.
I can build and publish all projects and the app runs on Android simulator. However, it looks like the data I input is either:
I can tell because when I get the data back from the database, the "something" is wrong.
So here's my question: how do I debug that set-up? I'm familiar with debugging my Xamarin app inside VS 2017, but I don't know how to debug the Web API, or how to look inside the database to see if the data I input are recorded correctly.
At this point, I'm not sure where the bug is, or how to find it. Thanks for your help!
Xamarin application:
As you already mentioned, you can debug your Xamarin app in Visual Studio just like you would any other .Net projects.
Web API:
Similarly, you can also debug your Web API project in Visual Studio.
SQL Server Database:
You cannot technically 'debug' a database, but you can verify the CRUD operations using SQL Server Management Studio (or SSMS ) provided you have the necessary access/credentials.
To find where the error is, I would suggest:
Refer the following links:
https://www.c-sharpcorner.com/article/asp-net-web-api-with-fiddler-and-postman/
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connect-query-ssms
Hope it helps. Cheers!
Found out you can debug a web API using Visual Studio almost the same way you debug a Xamarin app. Here's a nice tutorial for that:
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.