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

SQLite net with linq

$
0
0

Hi,

I want to create simple login page. To do that I nead to create simple query to database, to get login and password. Login is unique.
My query looks like this:
var query = (from s in dbConnection.Table() where s.login == name && s.password == password select s).FirstAsync();
User qr = query.Result;

Where User is a table name. It works only if value was find in database otherwise i got exception and application crash. How To return only 1 value from database and assign that value to string?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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