question

ozkaro-7807 avatar image
0 Votes"
ozkaro-7807 asked zyz629 commented

alternative to linq to query in SQlite c# (lambda compile error)

Hi there i need to compare each character in a string data from database and vice versa in any order but i have this error "cannot compile: lambda"

 var query = dbcon.Table<userDatabase>().Where(x => x.components.All(j => j.Equals(name.ToCharArray()))).ToListAsync();

I remember use the "using statements" to connect to the databases and foreach to access to the data but in this version of sqlite I don't know how use it and i can't find info about it


dotnet-xamarindotnet-sqlite
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

i need to compare each character in a string data from database and vice versa in any order

What are you trying to achieve? If you want to deal with the data in the database, you can first get the data field from the database ,after that you can do something with the data that you take out.

0 Votes 0 ·

What I want to do is compare each char of the string what I'm sending with the string in the component element stored in the database.
for example:
(send_string = "abcd") compare with (db_string = "xcka") and then loads all data which contains 'a' and 'c' to a list


thanks in advance

0 Votes 0 ·

Have you tried alessandrocaliaro's advice?

0 Votes 0 ·

1 Answer

alessandrocaliaro avatar image
0 Votes"
alessandrocaliaro answered

I think you can use the "query" method to execute a select

sqlite-net

manual query


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.