0

I created a mobile service app using azure connected it to SQL DB that has this table enter image description here

now trying to insert and retrieve data in my Windows Universal App gives me this error: enter image description here

I tried many things one of them was this code:

 HighScore item = new HighScore { SCORE = "100", playerName = "Mark" }; await App.MobileService.GetTable<HighScore>().InsertAsync(item); 

tried also to get the table bu name but no luck, now what is weird for me is that this same code works perfectly on the TodoItem Table but not on other tables.

Thanks in advance

1 Answer 1

1

The MobileServiceInvalidOperationException is a wrapper exception. The actual exception is in an InnerException inside that object. Based on the error message, your insert is not working.

You have provided no information on how you constructed the backend. Don't forget that you need to create the table in the SQL database and you need to create an appropriate controller for exposing the database table to your mobile client.

You have not provided any information on what the entity on your mobile client looks like. It needs to match the information you want to send to the backend.

Finally, take a look at my book - http://aka.ms/zumobook - Chapter 3 of the book goes into great detail on the data protocol.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for the detailed answer reading your answer I realized what foolish mistake I did:) I simply forgot to create a controller in the backend to expose the table..

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.