Reputation: 1803
I have the following Azure SQL table consisting of:
id customerid value
01 1 test
02 1 none
03 2 exam
04 2 what
05 3 rule
06 4 game
I have multiple customers that are supposed to use this app (E.g. customer1,customer2 etc.)
At the moment I am able to sync ALL data in this table to my app but I would like to "filter" the data so that customer1 only is able to sync his/her rows from Azure SQL to the app.
Thanks!
Upvotes: 0
Views: 88
Reputation: 56
You just need to add additional Where() clauses to your query, so for example:
var items = await todoTable.Where(todoItem => !todoItem.Done && todoItem.customerid == id of current user here).ToEnumerableAsync();
Upvotes: 1