Quantcast
Channel: Latest Questions by Kenned
Viewing all articles
Browse latest Browse all 14

Microsoft Azure database integration gets stuck on await Task operations

$
0
0
Hey guys, Recently our company decided to change our database work to work with Microsoft Azure, however having gone through most of their documentation and support chats nothing seems to be working. The issue is this, we run our code and get the insert into the database, but the await never returns and our code is stuck after having done any database operation. Here is the script: void Start() { Task.Run(TestTableConnection); } private async Task TestTableConnection() { var table = AzureMobileServiceClient.Client.GetTable(); Debug.Log("Testing InsertAsync..."); await TestInsertAsync(table); Debug.Log("Testing ToListAsync..."); await TestToListAsync(table); Debug.Log("Testing DeleteAsync..."); //await TestDeleteAsync(table); Debug.Log("All testing complete."); } private async Task TestInsertAsync(IMobileServiceTable table) { try { //var allEntries = await TestToListAsync(table); //var initialCount = allEntries.Count(); await table.InsertAsync(new Categories { categoryName = "NewTest" }); Debug.Log("I added stuff to the table"); // This part never gets printed to Unity but the insert happens to the database //allEntries = await TestToListAsync(table); //var newCount = allEntries.Count(); //Debug.Assert(newCount == initialCount + 1, "InsertAsync failed!"); } catch (Exception) { throw; } } } I hope my question makes sense, otherwise just give me a heads up and I'll provide a more detailed explanation.

Viewing all articles
Browse latest Browse all 14

Latest Images

Trending Articles





Latest Images