سؤال

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"

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top