Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Boolean with SQLite

$
0
0

Hi everyone

According to the documentation of SQLite the data type "Boolean" isn't known and will be converted to an integer-value 1 or 0. Although my data model uses a Boolean-property.

Now when I try to query the table using LINQ I'm unable to filter to this data type.
For example, this doesn't work:

                return AsyncConnection.Table<User>()
                    .Where(x => x.Username.ToLower().Equals(lowerUsername)
                        && x.Password.Equals(password)
                        && x.IsDeleted == false)
                    .FirstOrDefaultAsync();

How am I able to filter this Boolean-property so I can use the Where-statement?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>