Windows Azure Mobile Services Queries
-
21-12-2019 - |
Frage
items = await todoTable.Where(todoItem => todoItem.Text == "abcd").ToCollectionAsync(); i'm trying to make a login page where i compare the user id with the back end but to do so i want the result to be in string format and also i want to know what query to use it should be like select * from table where userid="user input"
Lösung
table.Where(todoItem => todoItem.Text == "abcd") creates a query on the node.js backend as following: "select * from todoItem where todoItem.Text = abcd."
todoItem => todoItem.Text =="abcd" is called a lambda expression and means all todoItems (normally in a List, in this case it's translated to a query) with a given condition, in this case all items where item.text = abcd
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow