I implemented local DB in my project and I am using following code for select all the items from local DB. MyCommunities is my model class.
public List<MyCommunities> GetItems()
{
lock (locker)
{
return (from i in database.Table<MyCommunities>() select i).ToList();
}
}
I am using following code for taking an item from local DB with a particular officename(it only return one item):
public MyCommunities GetItemByOfficename(string office)
{
lock (locker)
{
return database.Table<MyCommunities>().FirstOrDefault(x => x.Officename == office);
}
}
I am trying to select all the items from local DB having a particular userid(It should be a list of Mycommunities). Don't know how to add userid when parsing.
Thanks in advance