简体   繁体   中英

How to get column average from azure mobile apps

I am using azure mobile apps .net back-end for my windows 10 application and I would like to retrieve the column average from a table in my database. How can I do that? I have searched the internet and can't find anything useful.

My Table just has two columns; id (string) and Rating(int).

There are a couple of ways.

1) Do a LINQ query against an offline version of the data. This will calculate the average on the client

2) Do a LINQ query against the online version of the data. This will calculate the average on the client, but pull all the data from the server, which may be less than desirable.

3) Implement a Custom API that returns the average. This will calculate the average on the server, and allow you to do some caching of the average for quicker access.

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