EduardoGomez-1870 avatar image
0 Votes"
EduardoGomez-1870 asked EduardoGomez-4998 commented

Intergrate Azure with xamarin table Error

Hello everyone

I am learning Azure, So after finishing my XamContact app, to work perfectly with SQLite

I decided to Integrate Azure, I already did all the CRUD operation methods, but I get an error when trying to insert in the People table


As you can see I have a People table, but for some reason, when trying to get something out via Postman, I get an error // here is my code

So I don't know if I am calling the wrong table

here is my ASP web

What I don't understand is that if my table is name people, why if I put people in Postman it doesn't get it, but if I put I can get

If you see, I have a people table

image.png (31.0 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @EduardoGomez-1870 , could you please post the error log about this issue?And which Azure database service are you trying to integrate with ?

0 Votes 0 ·

As you can see, I have a table named83281-error-1.jpg people, but when I put it in postman, I get an ERROR

and for the xamarin forms app,

I get this

System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.'

when I try to add a Contact, here is the code

0 Votes 0 ·
error-1.jpg (699.0 KiB)

I downloaded again the zumoappservices, from GitHub, and it still creates me a People Table, instead of Person, and in postam if I do

I can pregorm a GET, but If I put

here is my backend

0 Votes 0 ·
Show more comments

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered EduardoGomez-4998 commented

You're using Entity Framework migrations to create/update the database schema;

 var migrator = new DbMigrator(new Migrations.Configuration());

It will pluralize Dto's to table names; check out this blog post. However, what's odd is when checking your repo, you don't have a "Person"/"People" object in the context, it's called contacts. I even checked your migrations and the table created is Contacts. You also have ContactController in the PersonController filename. It's not decorated with [MobileAppController] which may affect offline sync but should be fine for making request from Postman. Instead of person/people, try making the request to /contacts and see if you still get the error. If you still get an error, then how did you create the database to begin with?

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes I change it now and did a little console application to try it out, and it works perfectly I do not understand however why when checking the database, I have to put Contact instead of contacts if my DB in azure is name contracts

0 Votes 0 ·

by the way, if you do this is potman, it will work

I made this console app, just to tested it, and works fine

using AzureTest;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;

const string Url = "";

using (HttpClient client = new HttpClient()) {

 var request = await client.GetAsync(Url);
 if (request.IsSuccessStatusCode) {

     var content = await request.Content.ReadAsStringAsync();
     var res = JsonConvert.DeserializeObject<List<Contacts.Contact>>(content);

     foreach (var item in res) {



but when I go to Xamarin, it doesn't read, or add, or update or delete

0 Votes 0 ·

the database was created by Microsoft, is in the azure getting started github

0 Votes 0 ·
Show more comments